From 7cd86cffb1c0ceeb1df96f5a15b9a2af5a87408c Mon Sep 17 00:00:00 2001 From: leedj312 Date: Tue, 17 Jun 2025 09:10:54 +0900 Subject: [PATCH] =?UTF-8?q?=EC=88=98=EC=9A=94=EB=A7=A4=EC=B9=AD=20?= =?UTF-8?q?=EA=B2=80=ED=86=A0=20=EC=9E=91=EC=97=85=EC=A4=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wr/app/matMng/coMat/coMatRvw/page.tsx | 1735 +++++++++-------- .../prfmncSttn/pbnstPrfmncSttn/page.tsx | 6 +- .../wr/app/store/matDmd/coMatRvw/headList.tsx | 10 +- apps/wr/app/store/matDmd/coMatRvw/index.tsx | 42 +- apps/wr/app/store/matDmd/coMatRvw/type.tsx | 70 + .../fcltReg/pbnstReg/mngReg/mngRegForm.tsx | 3 - .../fcltReg/bdstRegModal/bdstRegModal.tsx | 1 - .../fcOrgwtsRegModal/fcOrgwtsRegModal.tsx | 1 - 8 files changed, 1030 insertions(+), 838 deletions(-) create mode 100644 apps/wr/app/store/matDmd/coMatRvw/type.tsx diff --git a/apps/wr/app/matMng/coMat/coMatRvw/page.tsx b/apps/wr/app/matMng/coMat/coMatRvw/page.tsx index 248a45484..d661e60d6 100644 --- a/apps/wr/app/matMng/coMat/coMatRvw/page.tsx +++ b/apps/wr/app/matMng/coMat/coMatRvw/page.tsx @@ -1,847 +1,942 @@ "use client"; import { useWrStore } from "@/app/store"; +import {DmdCoReqSchema, type DmdCoReqType, type DmdMatTableType} from "@/app/store/matDmd/coMatRvw/type"; import { formH1Class, formTableName } from "@/components/lib/class/comClass"; -import { getCity } from "@/components/lib/func/commom"; +import { getCity, tableData, yearOptions } from "@/components/lib/func/commom"; import { CmpttnModal } from "@/components/ui/modal/coMat/cmpttnModal"; import { CoMatModal } from "@/components/ui/modal/coMat/coMatModal"; import type { objSearchType } from "@/components/ui/modal/fcltReg/bdstRegModal/bdstRegModal"; -import { ContentsDiv, Form, FormField, FormUi, ScrollArea, SearchDiv, SearchFormLeft, SearchFormRight, SearchInput, SelectBox, Title, UiModal, UiTable, type SelectDataType } from "@common/business_components/ui"; +import { + ContentsDiv, + Form, + FormField, + FormUi, + ScrollArea, + SearchDiv, + SearchFormLeft, + SearchFormRight, + SearchInput, + SelectBox, + Title, + UiModal, + UiTable, + type SelectDataType, +} from "@common/business_components/ui"; import ListDiv from "@common/business_components/ui/list_div"; import { Button, DatePicker, Input, Label } from "@common/components/ui"; -import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@common/components/ui/tooltip"; +import { + Tooltip, + TooltipContent, + TooltipProvider, + TooltipTrigger, +} from "@common/components/ui/tooltip"; import { zodResolver } from "@hookform/resolvers/zod"; -import { useEffect, useState } from "react"; +import { useEffect, useRef, useState } from "react"; import { useFieldArray, useForm } from "react-hook-form"; +import toast, { Toaster } from "react-hot-toast"; import { z } from "zod"; - +import moment from "moment"; export default function CoMatRvw() { - const { code, coRvw, } = useWrStore((state) => state); - const { coRvwHeadList, } = coRvw; - const [fromDate, setFromDate] = useState(new Date()); - const [toDate, setToDate] = useState(new Date()); - const [selectSgg, setSelectSgg] = useState() - const [objSearch, setObjSearch] = useState({ sgg: "", city: "" }); - const [isPrcsMo, setIsPrcsMo] = useState<{ - isModal: boolean; - }>({ isModal: false }); - const [isTrfMo, setIsTrfMo] = useState<{ - isModal: boolean; - }>({ isModal: false, }); - const [isCmpttnMo, setIsCmpttnMo] = useState<{ - isModal: boolean; - }>({ isModal: false, }); + const { code, coRvw ,coMatRvwInit} = useWrStore((state) => state); +const {coMatRvwRes} = coRvw + + const initRef = useRef(false); + const { coRvwHeadList } = coRvw; + const [dmdMatData, setDmdMtaData] = useState([]); + const [selectSgg, setSelectSgg] = useState(); + const [objSearch, setObjSearch] = useState({ + sgg: "", + city: "", + }); + const [isPrcsMo, setIsPrcsMo] = useState<{ + isModal: boolean; + }>({ isModal: false }); + const [isTrfMo, setIsTrfMo] = useState<{ + isModal: boolean; + }>({ isModal: false }); + const [isCmpttnMo, setIsCmpttnMo] = useState<{ + isModal: boolean; + }>({ isModal: false }); + const [fromDate, setFromDate] = useState( + String(new Date().getFullYear()) + ); + const [toDate, setToDate] = useState( + String(new Date().getFullYear()) + ); + const [selectData, setSelectData] = useState({} as DmdCoReqType) + const form = useForm>({ + resolver: zodResolver(DmdCoReqSchema), + }) + + const TableCellClick = (index:number) =>{ + console.log(coMatRvwRes ) + if(coMatRvwRes && coMatRvwRes[index]){ + + console.log(dmdMatData[index]) - const schema = z.object({ - fcltCpct: z.number().optional(), - }); + setSelectData(coMatRvwRes[index] ) + } - const form = useForm>({ - resolver: zodResolver(schema), - defaultValues: { - fcltCpct: 0, - } - }); + } - const getSelCity = (val: string | number) => { - const cityValue = String(val); // Ensure val is treated as a string - const data = getCity(cityValue, code.sggCd); - setSelectSgg(data); - setObjSearch({ city: cityValue, sgg: '' }); - }; + useEffect(()=>{ + if(coMatRvwRes){ + const data =coMatRvwRes.map((item)=>{ + return ({ + ...item, + regDt: moment(item.regDt).format('YYYY-MM-DD') , + state:'' + })}) + setDmdMtaData(tableData(data,{code}) ) + } + },[coMatRvwRes]) - const getSgg = (val: string | number) => { - console.log(val); - setObjSearch({ ...objSearch, sgg: String(val) }) - }; + const getSelCity = (val: string | number) => { + const cityValue = String(val); // Ensure val is treated as a string + const data = getCity(cityValue, code.sggCd); + setSelectSgg(data); + setObjSearch({ city: cityValue, sgg: "" }); + }; - useEffect(() => { - if (fromDate > toDate) { - const newFromDate = new Date(toDate); - newFromDate.setDate(toDate.getDate() - 1); - setFromDate(newFromDate); - } - }, [toDate]); + const getSgg = (val: string | number) => { + setObjSearch({ ...objSearch, sgg: String(val) }); + }; - return ( - <> - -
-
- - <SearchDiv> - <SearchFormLeft> - <div className="col-span-8 flex flex-row"> - <SelectBox - className="col-span-2 w-1/3 h-full text-2xl" - label="시도" - selectClass={""} - selectArray={code.cityCd || []} - onSelectValue={getSelCity} - /> - <SelectBox - className="col-span-2 w-1/3 h-full text-2xl ml-4" - label="시군구" - selectClass={""} - selectArray={selectSgg || []} - onSelectValue={getSgg} - /> - <div className="col-span-5 w-full"> - <div className="flex flex-row items-center"> - <Label className="text-xl text-gray-600 ml-4 mr-4">수요신청년도</Label> - <div className="flex flex-row"> - <DatePicker mode={'single'} - selected={fromDate} - onSelect={(date: Date | undefined) => { if (date) setFromDate(date) }} /> - <span className="ml-2 mr-2">~</span> - <DatePicker mode={'single'} - selected={toDate} - onSelect={(date: Date | undefined) => { if (date) setToDate(date) }} /> - </div> - </div> - </div> - <SearchInput - className={"text-2xl"} - label="회사명" - textValue={""} - setText={(e) => { - }} - /> - </div> - </SearchFormLeft> - <SearchFormRight - className="w-2/12 mx-5 flex flex-col items-center justify-center space-x-2 "> - <div className="space-y"> - <div className="flex flex-row space-x-2"> - <Button - size={"sm"} - onClick={(e) => { }} - > - 조회 - </Button> - </div> - </div> - </SearchFormRight> - </SearchDiv> + +useEffect(() =>{ + if(!initRef.current){ + coMatRvwInit(1,13,'11',fromDate,toDate) + initRef.current = true; + } + +},[coMatRvwInit,initRef,fromDate,toDate]) + + +useEffect(() =>{ + if(selectData){ + console.log(selectData) + form.reset(selectData) + } + +},[selectData,form ] ) + return ( + <> + <ContentsDiv> + <div className="grid grid-cols-4 gap-4"> + <div className="col-span-4"> + <Title title={"수요매칭검토"} /> + <SearchDiv> + <SearchFormLeft> + <div className="col-span-10 flex flex-row"> + <SelectBox + className="col-span-2 w-1/3 h-full text-2xl" + label="시도" + selectClass={""} + selectArray={code.cityCd || []} + onSelectValue={getSelCity} + /> + <SelectBox + className="col-span-2 w-1/3 h-full text-2xl ml-4" + label="시군구" + selectClass={""} + selectArray={selectSgg || []} + onSelectValue={getSgg} + /> + <div className="col-span-7 w-full"> + <div className="flex flex-row items-center"> + <Label className="text-xl text-gray-600 mx-6"> + 하수 재이용년도 + </Label> + <SelectBox + className="h-full w-32 text-2xl" + label="" + selectClass={""} + selectArray={yearOptions} + value={fromDate} + onSelectValue={(val: string | number) => + setFromDate(String(val)) + } + /> + <span className="mx-6">~</span> + <SelectBox + className="h-full w-32 text-2xl" + label="" + selectClass={""} + selectArray={yearOptions} + value={toDate} + onSelectValue={(val: string | number) => + setToDate(String(val)) + } + /> + <div className="col-span-2 ml-6"> + <SearchInput + className={"text-2xl"} + label="회사명" + textValue={""} + setText={(e) => {}} + /> + </div> </div> + </div> </div> + </SearchFormLeft> + <SearchFormRight className="w-2/12 mx-5 flex flex-col items-center justify-center space-x-2 "> + <div className="space-y"> + <div className="flex flex-row space-x-2"> + <Button + size={"sm"} + onClick={(e) => { + if (fromDate && toDate) { + const fromNum = Number(fromDate); + const toNum = Number(toDate); + if (fromNum > toNum) { + toast.error( + "시작년도가 종료년도 이후로 설정할 수 없습니다." + ); + } else { + } + } + }} + > + 조회 + </Button> + </div> + </div> + </SearchFormRight> + </SearchDiv> + </div> + </div> - <div className="grid grid-cols-6 gap-4"> - <div className="col-span-6"> - <ListDiv> - <UiTable - headName={"수요매칭검토현황"} - tableData={[]} - children={undefined} - headlist={coRvwHeadList} - pageSize={20} - total={100000} - cellClick={(index: number | undefined, headId: string) => { + <div className="grid grid-cols-6 g ap-4"> + <div className="col-span-6"> + <ListDiv> + <UiTable + headName={"수요매칭검토현황"} + tableData={dmdMatData||[]} + headlist={coRvwHeadList} + pageSize={20} + total={100000} + cellClick={(index:number|undefined, headId:string) =>{ + if(index !==undefined&& index>=0){ + + TableCellClick(index) + } + } } + onPageChange={() => {}} + ></UiTable> + </ListDiv> + <hr /> + <ScrollArea className="h-[49vh]"> + <ListDiv> + <h3 className="mt-4 ml-2 text-2xl font-medium text-label"> + 수요신청 상세현황 + </h3> + <Form {...form}> + <div className="grid grid-cols-12 gap-4 ml-4 mr-4"> + <div className="col-span-3 mt-4"> + <FormField + control={form.control} + name="regDt" + render={({ field }) => ( + <FormUi label="요구시기"> + <Input + placeholder="" + type="text" + onChange={(e) => { + field.onChange(Number(e.target.value)); + }} + value={ moment(field.value).format('YYYY-MM-DD') ?? ""} + readOnly + /> + </FormUi> + )} + /> + </div> + <div className="col-span-3 mt-4"> + <FormField + control={form.control} + name="dmndQty" + render={({ field }) => ( + <FormUi label="요구수량(M3/d)"> + <Input + placeholder="" + type="number" + step="0.1" + onChange={(e) => { + field.onChange(Number(e.target.value)); + }} + value={field.value ?? 0} + /> + </FormUi> + )} + /> + </div> + <div className="col-span-3 mt-4"> + <FormField + control={form.control} + name="useUsgCd" + render={({ field }) => ( + <FormUi label="사용용도"> + <Input + placeholder="" + type="text" + step="0.1" + onChange={(e) => { + field.onChange(e.target.value); + }} + value={field.value ?? ''} + readOnly + /> + </FormUi> + )} + /> + </div> + <div className="col-span-3 mt-4"> + <FormField + control={form.control} + name="wntUntprc" + render={({ field }) => ( + <FormUi label="희망단가(원/m3)"> + <Input + placeholder="" + type="number" + step="0.1" + onChange={(e) => { + field.onChange(Number(e.target.value)); + }} + value={field.value ?? 0} + /> + </FormUi> + )} + /> + </div> + <div className="col-span-12 w-full"> + <h1 className={formH1Class}>요구수질</h1> + </div> + <div className="col-span-3 mt-4"> + <FormField + control={form.control} + name="grssClfg" + render={({ field }) => ( + <FormUi label="총대장균군수 (개/100ml)"> + <Input + placeholder="" + type="number" + step="0.1" + onChange={(e) => { + field.onChange(Number(e.target.value)); + }} + value={field.value ?? 0} + /> + </FormUi> + )} + /> + </div> + <div className="col-span-3 mt-4"> + <FormField + control={form.control} + name="combResdch" + render={({ field }) => ( + <FormUi label="결합잔류염소(mg/L)"> + <Input + placeholder="" + type="number" + step="0.1" + onChange={(e) => { + field.onChange(Number(e.target.value)); + }} + value={field.value ?? 0} + /> + </FormUi> + )} + /> + </div> + <div className="col-span-3 mt-4"> + <FormField + control={form.control} + name="trbt" + render={({ field }) => ( + <FormUi label="탁도(NTU)"> + <Input + placeholder="" + type="number" + step="0.1" + onChange={(e) => { + field.onChange(Number(e.target.value)); + }} + value={field.value ?? 0} + /> + </FormUi> + )} + /> + </div> + <div className="col-span-3 mt-4"> + <FormField + control={form.control} + name="blgcOxygDmndQnt" + render={({ field }) => ( + <FormUi label="생물학적 산소요구량(BOD)(mg/L)"> + <Input + placeholder="" + type="number" + step="0.1" + onChange={(e) => { + field.onChange(Number(e.target.value)); + }} + value={field.value ?? 0} + /> + </FormUi> + )} + /> + </div> + <div className="col-span-3 mt-4"> + <FormField + control={form.control} + name="smll" + render={({ field }) => ( + <FormUi label="냄새"> + <Input + placeholder="" + type="number" + step="0.1" + onChange={(e) => { + field.onChange(Number(e.target.value)); + }} + value={field.value ?? 0} + /> + </FormUi> + )} + /> + </div> + <div className="col-span-3 mt-4"> + <FormField + control={form.control} + name="crmty" + render={({ field }) => ( + <FormUi label="색도(도)"> + <Input + placeholder="" + type="number" + step="0.1" + onChange={(e) => { + field.onChange(Number(e.target.value)); + }} + value={field.value ?? 0} + /> + </FormUi> + )} + /> + </div> + <div className="col-span-3 mt-4"> + <FormField + control={form.control} + name="tn" + render={({ field }) => ( + <FormUi label="총질소 (T-N)(mg/L)"> + <Input + placeholder="" + type="number" + step="0.1" + onChange={(e) => { + field.onChange(Number(e.target.value)); + }} + value={field.value ?? 0} + /> + </FormUi> + )} + /> + </div> + <div className="col-span-3 mt-4"> + <FormField + control={form.control} + name="tph" + render={({ field }) => ( + <FormUi label="총인(T-P)(mg/L)"> + <Input + placeholder="" + type="number" + step="0.1" + onChange={(e) => { + field.onChange(Number(e.target.value)); + }} + value={field.value ?? 0} + /> + </FormUi> + )} + /> + </div> + <div className="col-span-3 mt-4"> + <FormField + control={form.control} + name="ph" + render={({ field }) => ( + <FormUi label="수소이온농도(pH)"> + <Input + placeholder="" + type="number" + step="0.1" + onChange={(e) => { + field.onChange(Number(e.target.value)); + }} + value={field.value ?? 0} + /> + </FormUi> + )} + /> + </div> + <div className="col-span-3 mt-4"> + <FormField + control={form.control} + name="clIonQnt" + render={({ field }) => ( + <FormUi label="염화물(mgCL/L)"> + <Input + placeholder="" + type="number" + step="0.1" + onChange={(e) => { + field.onChange(Number(e.target.value)); + }} + value={field.value ?? 0} + /> + </FormUi> + )} + /> + </div> + <div className="col-span-3 mt-4"> + <FormField + control={form.control} + name="cdtnv" + render={({ field }) => ( + <FormUi label="전기전도도(㎲/cm)"> + <Input + placeholder="" + type="number" + onChange={(e) => { + field.onChange(Number(e.target.value)); + }} + value={field.value ?? 0} + /> + </FormUi> + )} + /> + </div> + <div className="col-span-3 mt-4"> + <FormField + control={form.control} + name="rmrk" + render={({ field }) => ( + <FormUi label="비고"> + <Input + placeholder="" + type="text" + onChange={(e) => { + field.onChange(e.target.value); + }} + value={field.value ?? ""} + /> + </FormUi> + )} + /> + </div> + <div className="col-span-12 w-full"> + <h1 className={formH1Class}>공급처 후보지</h1> + </div> + <div className="col-span-4 mt-4"> + <FormField + control={form.control} + name="" + render={({ field }) => ( + <FormUi label="후보지1"> + <Input + placeholder="" + type="text" + onChange={(e) => { + field.onChange(String(e.target.value)); + }} + value={field.value ?? ""} + /> + </FormUi> + )} + /> + </div> + <div className="col-span-4 mt-4"> + <FormField + control={form.control} + name="" + render={({ field }) => ( + <FormUi label="후보지2"> + <Input + placeholder="" + type="text" + onChange={(e) => { + field.onChange(e.target.value); + }} + value={field.value ?? ""} + /> + </FormUi> + )} + /> + </div> + <div className="col-span-4 mt-4"> + <FormField + control={form.control} + name="" + render={({ field }) => ( + <FormUi label="후보지3"> + <Input + placeholder="" + type="text" + onChange={(e) => { + field.onChange(e.target.value); + }} + value={field.value ?? ""} + /> + </FormUi> + )} + /> + </div> + </div> + </Form> + <hr className="mt-8" /> + <Form {...form}> + <h3 className="mt-4 ml-2 text-2xl font-medium text-label"> + 표준공사비 산정 + </h3> + <div className="flex items-center mx-3 mb-3"> + <h1 className="">처리시설 표준공사비 산정</h1> + + <Button size={"sm"} onClick={(e) => {}}> + 계산 + </Button> + <Button size={"sm"} onClick={(e) => {}}> + 저장 + </Button> + </div> + <div className="grid grid-cols-12 gap-4 ml-4 mr-4"> + <div className="col-span-3 mt-4"> + <FormField + control={form.control} + name="" + render={({ field }) => ( + <FormUi label="용도"> + <Input + placeholder="" + type="text" + onChange={(e) => { + field.onChange(Number(e.target.value)); + }} + value={field.value ?? ""} + /> + </FormUi> + )} + /> + </div> + <div className="col-span-3 mt-4"> + <FormField + control={form.control} + name="" + render={({ field }) => ( + <FormUi label="요구수량(M3/d)"> + <Input + placeholder="" + type="number" + step="0.1" + onChange={(e) => { + field.onChange(Number(e.target.value)); + }} + value={field.value ?? 0} + /> + </FormUi> + )} + /> + </div> + <div className="col-span-3 mt-4"> + <Label className=""> + 용도에 따른 처리공정 + <i + className="diveicon di-search" + onClick={(e) => setIsPrcsMo({ isModal: true })} + /> + </Label> + + <FormField + control={form.control} + name="" + render={({ field }) => ( + <FormUi label=""> + <Input + placeholder="" + type="text" + onChange={(e) => { + field.onChange(Number(e.target.value)); + }} + value={field.value || ""} + className="mt-2" + /> + </FormUi> + )} + /> + </div> + <div className="col-span-3 mt-4"> + <FormField + control={form.control} + name="" + render={({ field }) => ( + <FormUi label="처리시설 용량(요구수량 * 365일)"> + <Input + placeholder="" + type="number" + step="0.001" + onChange={(e) => { + field.onChange(Number(e.target.value)); + }} + value={field.value ?? 0} + /> + </FormUi> + )} + /> + </div> + <div className="col-span-3 mt-4"> + <div className="flex items-center justify-between"> + <Label>처리시설용량에 따른 공사비(백만원)</Label> + <Button + size={"sm"} + onClick={(e) => setIsCmpttnMo({ isModal: true })} + className="bg-none" + > + 공사비 산정표 보기 + </Button> + </div> + <FormField + control={form.control} + name="" + render={({ field }) => ( + <FormUi label=""> + <Input + placeholder="" + type="number" + step="0.001" + onChange={(e) => { + field.onChange(Number(e.target.value)); + }} + value={field.value ?? 0} + /> + </FormUi> + )} + /> + </div> + <div className="col-span-3 mt-4"> + <div className="flex items-center justify-between"> + <Label>시설부대경비 요율(%)</Label> + <Button + size={"sm"} + onClick={(e) => setIsTrfMo({ isModal: true })} + > + 요율표 보기 + </Button> + </div> + <FormField + control={form.control} + name="" + render={({ field }) => ( + <FormUi label=""> + <Input + placeholder="" + type="number" + step="0.01" + onChange={(e) => { + field.onChange(Number(e.target.value)); + }} + value={field.value ?? 0} + /> + </FormUi> + )} + /> + </div> + + <div className="col-span-3 mt-4"> + <Label> + 총사업비 (백만원) + <TooltipProvider> + <Tooltip> + <TooltipTrigger asChild> + <i className="diveicon di-search" /> + </TooltipTrigger> + <TooltipContent> + <div className="font-bold mb-1 text-xl"> + 총사업비 계산방법 + </div> + <div className="text-lg"> + 하수처리수 재이용시설 총 사업비 = + 공사비+시설부대경비{" "} + </div> + </TooltipContent> + </Tooltip> + </TooltipProvider> + </Label> + <FormField + control={form.control} + name="" + render={({ field }) => ( + <FormUi label=""> + <Input + placeholder="" + className="mt-2" + type="number" + step="0.01" + onChange={(e) => { + field.onChange(Number(e.target.value)); + }} + value={field.value ?? 0} + /> + </FormUi> + )} + /> + </div> + <div className="col-span-3 mt-4"> + <div className="flex items-center justify-between"> + <Label>공급처 선정</Label> + <Button + size={"sm"} + onClick={(e) => {}} + className="bg-none" + > + 후보지 조회 + </Button> + </div> + <FormField + control={form.control} + name="" + render={({ field }) => ( + <FormUi label=""> + <Input + placeholder="" + type="text" + onChange={(e) => { + field.onChange(Number(e.target.value)); + }} + value={field.value ?? ""} + /> + </FormUi> + )} + /> + </div> + + <div className="col-span-4 mt-4"> + <div> + <FormField + control={form.control} + name="" + render={({ field }) => ( + <FormUi label="공급관로 표준공사비(백만원)"> + <Input + placeholder="" + type="text" + step="0.001" + onChange={(e) => { + field.onChange(Number(e.target.value)); + }} + value={field.value ?? 0} + /> + </FormUi> + )} + /> + </div> + <div className="mt-4"> + <Label>관로 표준공사비 산정 프로그램</Label> + <Button + size={"sm"} + onClick={(e) => {}} + className="bg-none" + > + 다운로드 + </Button> + </div> + <div className="col-span-4 mt-4 mb-3"> + <FormField + control={form.control} + name="" + render={({ field }) => ( + <Label className="text-xl"> + 처리시설 + 공급관로 총사업비(백만원) + <FormUi label=""> + <Input + placeholder="" + type="text" + step="0.001" + onChange={(e) => { + field.onChange(Number(e.target.value)); }} - onPageChange={() => { }} - ></UiTable> - <hr /> - <ScrollArea className="h-[49vh]"> - <h3 className="mt-4 ml-2 text-2xl font-medium text-label">수요신청 상세현황</h3> - <Form {...form}> - <div className="grid grid-cols-12 gap-4 ml-4 mr-4"> - <div className="col-span-3 mt-4"> - <FormField - control={form.control} - name="" - render={({ field }) => ( - <FormUi label="요구시기"> - <Input - placeholder="" - type="text" - onChange={(e) => { - field.onChange(Number(e.target.value)); - }} - value={field.value ?? ""} - /> - </FormUi> - )} - /> - </div> - <div className="col-span-3 mt-4"> - <FormField - control={form.control} - name="" - render={({ field }) => ( - <FormUi label="요구수량(M3/d)"> - <Input - placeholder="" - type="number" - step="0.1" - onChange={(e) => { - field.onChange(Number(e.target.value)); - }} - value={field.value ?? 0} - /> - </FormUi> - )} - /> - </div> - <div className="col-span-3 mt-4"> - <FormField - control={form.control} - name="" - render={({ field }) => ( - <FormUi label="사용용도"> - <Input - placeholder="" - type="number" - step="0.1" - onChange={(e) => { - field.onChange(Number(e.target.value)); - }} - value={field.value ?? 0} - /> - </FormUi> - )} - /> - </div> - <div className="col-span-3 mt-4"> - <FormField - control={form.control} - name="" - render={({ field }) => ( - <FormUi label="희망단가(원/m3)"> - <Input - placeholder="" - type="number" - step="0.1" - onChange={(e) => { - field.onChange(Number(e.target.value)); - }} - value={field.value ?? 0} - /> - </FormUi> - )} - /> - </div> - <div className="col-span-12 w-full"> - <h1 className={formH1Class}>요구수질</h1> - </div> - <div className="col-span-3 mt-4"> - <FormField - control={form.control} - name="" - render={({ field }) => ( - <FormUi label="총대장균군수 (개/100ml)"> - <Input - placeholder="" - type="number" - step="0.1" - onChange={(e) => { - field.onChange(Number(e.target.value)); - }} - value={field.value ?? 0} - /> - </FormUi> - )} - /> - </div> - <div className="col-span-3 mt-4"> - <FormField - control={form.control} - name="" - render={({ field }) => ( - <FormUi label="결합잔류염소(mg/L)"> - <Input - placeholder="" - type="number" - step="0.1" - onChange={(e) => { - field.onChange(Number(e.target.value)); - }} - value={field.value ?? 0} - /> - </FormUi> - )} - /> - </div> - <div className="col-span-3 mt-4"> - <FormField - control={form.control} - name="" - render={({ field }) => ( - <FormUi label="탁도(NTU)"> - <Input - placeholder="" - type="number" - step="0.1" - onChange={(e) => { - field.onChange(Number(e.target.value)); - }} - value={field.value ?? 0} - /> - </FormUi> - )} - /> - </div> - <div className="col-span-3 mt-4"> - <FormField - control={form.control} - name="" - render={({ field }) => ( - <FormUi label="생물학적 산소요구량(BOD)(mg/L)"> - <Input - placeholder="" - type="number" - step="0.1" - onChange={(e) => { - field.onChange(Number(e.target.value)); - }} - value={field.value ?? 0} - /> - </FormUi> - )} - /> - </div> - <div className="col-span-3 mt-4"> - <FormField - control={form.control} - name="" - render={({ field }) => ( - <FormUi label="냄새"> - <Input - placeholder="" - type="number" - step="0.1" - onChange={(e) => { - field.onChange(Number(e.target.value)); - }} - value={field.value ?? 0} - /> - </FormUi> - )} - /> - </div> - <div className="col-span-3 mt-4"> - <FormField - control={form.control} - name="" - render={({ field }) => ( - <FormUi label="색도(도)"> - <Input - placeholder="" - type="number" - step="0.1" - onChange={(e) => { - field.onChange(Number(e.target.value)); - }} - value={field.value ?? 0} - /> - </FormUi> - )} - /> - </div> - <div className="col-span-3 mt-4"> - <FormField - control={form.control} - name="" - render={({ field }) => ( - <FormUi label="총질소 (T-N)(mg/L)"> - <Input - placeholder="" - type="number" - step="0.1" - onChange={(e) => { - field.onChange(Number(e.target.value)); - }} - value={field.value ?? 0} - /> - </FormUi> - )} - /> - </div> - <div className="col-span-3 mt-4"> - <FormField - control={form.control} - name="" - render={({ field }) => ( - <FormUi label="총인(T-P)(mg/L)"> - <Input - placeholder="" - type="number" - step="0.1" - onChange={(e) => { - field.onChange(Number(e.target.value)); - }} - value={field.value ?? 0} - /> - </FormUi> - )} - /> - </div> - <div className="col-span-3 mt-4"> - <FormField - control={form.control} - name="" - render={({ field }) => ( - <FormUi label="수소이온농도(pH)"> - <Input - placeholder="" - type="number" - step="0.1" - onChange={(e) => { - field.onChange(Number(e.target.value)); - }} - value={field.value ?? 0} - /> - </FormUi> - )} - /> - </div> - <div className="col-span-3 mt-4"> - <FormField - control={form.control} - name="" - render={({ field }) => ( - <FormUi label="염화물(mgCL/L)"> - <Input - placeholder="" - type="number" - step="0.1" - onChange={(e) => { - field.onChange(Number(e.target.value)); - }} - value={field.value ?? 0} - /> - </FormUi> - )} - /> - </div> - <div className="col-span-3 mt-4"> - <FormField - control={form.control} - name="" - render={({ field }) => ( - <FormUi label="전기전도도(㎲/cm)"> - <Input - placeholder="" - type="number" - onChange={(e) => { - field.onChange(Number(e.target.value)); - }} - value={field.value ?? 0} - /> - </FormUi> - )} - /> - </div> - <div className="col-span-3 mt-4"> - <FormField - control={form.control} - name="" - render={({ field }) => ( - <FormUi label="비고"> - <Input - placeholder="" - type="text" - onChange={(e) => { - field.onChange(e.target.value); - }} - value={field.value ?? ""} - /> - </FormUi> - )} - /> - </div> - <div className="col-span-12 w-full"> - <h1 className={formH1Class}>공급처 후보지</h1> - </div> - <div className="col-span-4 mt-4"> - <FormField - control={form.control} - name="" - render={({ field }) => ( - <FormUi label="후보지1"> - <Input - placeholder="" - type="text" - onChange={(e) => { - field.onChange(String(e.target.value)); - }} - value={field.value ?? ""} - /> - </FormUi> - )} - /> - </div> - <div className="col-span-4 mt-4"> - <FormField - control={form.control} - name="" - render={({ field }) => ( - <FormUi label="후보지2"> - <Input - placeholder="" - type="text" - onChange={(e) => { - field.onChange(e.target.value); - }} - value={field.value ?? ""} - /> - </FormUi> - )} - /> - </div> - <div className="col-span-4 mt-4"> - <FormField - control={form.control} - name="" - render={({ field }) => ( - <FormUi label="후보지3"> - <Input - placeholder="" - type="text" - onChange={(e) => { - field.onChange(e.target.value); - }} - value={field.value ?? ""} - /> - </FormUi> - )} - /> - </div> - </div> - </Form> - <hr className="mt-8" /> - <Form {...form}> - <h3 className="mt-4 ml-2 text-2xl font-medium text-label">표준공사비 산정</h3> - <div className="flex items-center mx-3 mb-3"> - <h1 className="">처리시설 표준공사비 산정</h1> - - <Button - size={"sm"} - onClick={(e) => { }} - > - 계산 - </Button> - <Button - size={"sm"} - onClick={(e) => { }} - > - 저장 - </Button> - - </div> - <div className="grid grid-cols-12 gap-4 ml-4 mr-4"> - <div className="col-span-3 mt-4"> - <FormField - control={form.control} - name="" - render={({ field }) => ( - <FormUi label="용도"> - <Input - placeholder="" - type="text" - onChange={(e) => { - field.onChange(Number(e.target.value)); - }} - value={field.value ?? ""} - /> - </FormUi> - )} - /> - </div> - <div className="col-span-3 mt-4"> - <FormField - control={form.control} - name="" - render={({ field }) => ( - <FormUi label="요구수량(M3/d)"> - <Input - placeholder="" - type="number" - step="0.1" - onChange={(e) => { - field.onChange(Number(e.target.value)); - }} - value={field.value ?? 0} - /> - </FormUi> - )} - /> - </div> - <div className="col-span-3 mt-4"> - <Label className="">용도에 따른 처리공정<i className="diveicon di-search" onClick={(e) => setIsPrcsMo({ isModal: true })} /></Label> - - <FormField - control={form.control} - name="" - render={({ field }) => ( - <FormUi label=""> - <Input - placeholder="" - type="text" - onChange={(e) => { - field.onChange(Number(e.target.value)); - }} - value={field.value || ""} - className="mt-2" - /> - </FormUi> - )} - /> - </div> - <div className="col-span-3 mt-4"> - <FormField - control={form.control} - name="" - render={({ field }) => ( - <FormUi label="처리시설 용량(요구수량 * 365일)"> - <Input - placeholder="" - type="number" - step="0.001" - onChange={(e) => { - field.onChange(Number(e.target.value)); - }} - value={field.value ?? 0} - /> - </FormUi> - )} - /> - </div> - <div className="col-span-3 mt-4"> - <div className="flex items-center justify-between"> - <Label>처리시설용량에 따른 공사비(백만원)</Label> - <Button - size={"sm"} - onClick={(e) => setIsCmpttnMo({ isModal: true })} - className="bg-none" - > - 공사비 산정표 보기 - </Button> - </div> - <FormField - control={form.control} - name="" - render={({ field }) => ( - <FormUi label=""> - <Input - placeholder="" - type="number" - step="0.001" - onChange={(e) => { - field.onChange(Number(e.target.value)); - }} - value={field.value ?? 0} - /> - </FormUi> - )} - /> - </div> - <div className="col-span-3 mt-4"> - <div className="flex items-center justify-between"> - <Label>시설부대경비 요율(%)</Label> - <Button - size={"sm"} - onClick={(e) => setIsTrfMo({ isModal: true })} - > - 요율표 보기 - </Button> - </div> - <FormField - control={form.control} - name="" - render={({ field }) => ( - <FormUi label=""> - <Input - placeholder="" - type="number" - step="0.01" - onChange={(e) => { - field.onChange(Number(e.target.value)); - }} - value={field.value ?? 0} - /> - </FormUi> - )} - /> - </div> - - <div className="col-span-3 mt-4"> - <Label>총사업비 (백만원) - <TooltipProvider> - <Tooltip> - <TooltipTrigger asChild> - <i className="diveicon di-search" /> - </TooltipTrigger> - <TooltipContent> - <div className="font-bold mb-1 text-xl">총사업비 계산방법</div> - <div className="text-lg">하수처리수 재이용시설 총 사업비 = 공사비+시설부대경비 </div> - </TooltipContent> - </Tooltip> - </TooltipProvider> - </Label> - <FormField - control={form.control} - name="" - render={({ field }) => ( - <FormUi label=""> - <Input - placeholder="" - className="mt-2" - type="number" - step="0.01" - onChange={(e) => { - field.onChange(Number(e.target.value)); - }} - value={field.value ?? 0} - /> - </FormUi> - )} - /> - </div> - <div className="col-span-3 mt-4"> - <div className="flex items-center justify-between"> - <Label>공급처 선정</Label> - <Button - size={"sm"} - onClick={(e) => { }} - className="bg-none" - > - 후보지 조회 - </Button> - </div> - <FormField - control={form.control} - name="" - render={({ field }) => ( - <FormUi label=""> - <Input - placeholder="" - type="text" - onChange={(e) => { - field.onChange(Number(e.target.value)); - }} - value={field.value ?? ""} - /> - </FormUi> - )} - /> - </div> - - <div className="col-span-4 mt-4"> - <div> - <FormField - control={form.control} - name="" - render={({ field }) => ( - <FormUi label="공급관로 표준공사비(백만원)"> - <Input - placeholder="" - type="text" - step="0.001" - onChange={(e) => { - field.onChange(Number(e.target.value)); - }} - value={field.value ?? 0} - /> - </FormUi> - )} - /> - </div> - <div className="mt-4"> - <Label>관로 표준공사비 산정 프로그램</Label> - <Button - size={"sm"} - onClick={(e) => { }} - className="bg-none" - > - 다운로드 - </Button> - </div> - <div className="col-span-4 mt-4 mb-3"> - <FormField - control={form.control} - name="" - render={({ field }) => ( - <Label className="text-xl">처리시설 + 공급관로 총사업비(백만원) - <FormUi label=""> - <Input - placeholder="" - type="text" - step="0.001" - onChange={(e) => { - field.onChange(Number(e.target.value)); - }} - readOnly={true} - value={field.value ?? 0} - /> - </FormUi> - </Label> - )} - /> - </div> - </div> - </div> - </Form> - </ScrollArea> - </ListDiv> + readOnly={true} + value={field.value ?? 0} + /> + </FormUi> + </Label> + )} + /> </div> - <UiModal - body={ - <> - <UiTable - headName={"용도에 따른 처리공정"} - tableData={[ - { usage: "청소", process: "총인처리시설 + 염소소독" }, - { usage: "화장실용수", process: "총인처리시설 + 염소소독" }, - { usage: "세척", process: "총인처리시설 + UV소독" }, - { usage: "살수", process: "총인처리시설 + UV소독" }, - { usage: "조경", process: "총인처리시설 + UV소독" }, - { usage: "농업", process: "총인처리시설 + UV소독" }, - { usage: "하천", process: "총인처리시설 + UV소독" }, - { usage: "지하수", process: "전처리시설 + RO" }, - { usage: "공업용수", process: "전처리시설 + RO" }, - - ]} - headlist={[ - { id: "usage", title: "용도" }, - { id: "process", title: "단위공정" } - ]} - pageSize={0} - total={0} - cellClick={() => { }} - onPageChange={() => { }} - /> - </> - } - bodyClass="w-[25vw] max-w-none h-[60vh]" - open={isPrcsMo.isModal} - onOpenChange={(open) => { - setIsPrcsMo({ isModal: open }); - }} - /> - <UiModal - body={ - <CoMatModal data={[]}></CoMatModal> - } - bodyClass="w-[40vw] max-w-none h-[70vh]" - open={isTrfMo.isModal} - onOpenChange={(open) => { - setIsTrfMo({ isModal: open }); - }} - /> - <UiModal - body={ - <CmpttnModal data={[]}></CmpttnModal> - } - bodyClass="w-[70vw] max-w-none h-[50vh]" - open={isCmpttnMo.isModal} - onOpenChange={(open) => { - setIsCmpttnMo({ isModal: open }); - }} - /> + </div> </div> - </ContentsDiv > - </> - ) -} \ No newline at end of file + </Form> + </ListDiv> + </ScrollArea> + </div> + <UiModal + body={ + <> + <UiTable + headName={"용도에 따른 처리공정"} + tableData={[ + { usage: "청소", process: "총인처리시설 + 염소소독" }, + { usage: "화장실용수", process: "총인처리시설 + 염소소독" }, + { usage: "세척", process: "총인처리시설 + UV소독" }, + { usage: "살수", process: "총인처리시설 + UV소독" }, + { usage: "조경", process: "총인처리시설 + UV소독" }, + { usage: "농업", process: "총인처리시설 + UV소독" }, + { usage: "하천", process: "총인처리시설 + UV소독" }, + { usage: "지하수", process: "전처리시설 + RO" }, + { usage: "공업용수", process: "전처리시설 + RO" }, + ]} + headlist={[ + { id: "usage", title: "용도" }, + { id: "process", title: "단위공정" }, + ]} + pageSize={0} + total={0} + cellClick={() => {}} + onPageChange={() => {}} + /> + </> + } + bodyClass="w-[25vw] max-w-none h-[60vh]" + open={isPrcsMo.isModal} + onOpenChange={(open) => { + setIsPrcsMo({ isModal: open }); + }} + /> + <UiModal + body={<CoMatModal data={[]}></CoMatModal>} + bodyClass="w-[40vw] max-w-none h-[70vh]" + open={isTrfMo.isModal} + onOpenChange={(open) => { + setIsTrfMo({ isModal: open }); + }} + /> + <UiModal + body={<CmpttnModal data={[]}></CmpttnModal>} + bodyClass="w-[70vw] max-w-none h-[50vh]" + open={isCmpttnMo.isModal} + onOpenChange={(open) => { + setIsCmpttnMo({ isModal: open }); + }} + /> + </div> + </ContentsDiv> + <Toaster position="top-center" /> + </> + ); +} diff --git a/apps/wr/app/ruseFcltMng/prfmncSttn/pbnstPrfmncSttn/page.tsx b/apps/wr/app/ruseFcltMng/prfmncSttn/pbnstPrfmncSttn/page.tsx index a8f6efc3f..f500c2479 100644 --- a/apps/wr/app/ruseFcltMng/prfmncSttn/pbnstPrfmncSttn/page.tsx +++ b/apps/wr/app/ruseFcltMng/prfmncSttn/pbnstPrfmncSttn/page.tsx @@ -11,6 +11,7 @@ import ListDiv from "@common/business_components/ui/list_div"; import { Button, Label, Table, TableBody, TableHeader } from "@common/components/ui"; import { useEffect, useRef, useState } from "react"; import { headMakeprfmnc } from "../../prfmncReg/chkgdnReg/TableHead"; +import toast, { Toaster } from "react-hot-toast"; @@ -587,10 +588,10 @@ export default function PbnstPrfmncSttn() { const fromNum = Number(fromDate); const toNum = Number(toDate); if (fromNum > toNum) { - alert("시작년도가 종료년도 이후로 설정할 수 없습니다."); + toast.error("시작년도가 종료년도 이후로 설정할 수 없습니다."); } else { if (toNum - fromNum > 5) { - alert("최대 5년까지 선택 가능합니다."); + toast.error("최대 5년까지 선택 가능합니다."); } else { tableHeadMaker(fromNum, toNum); @@ -679,6 +680,7 @@ export default function PbnstPrfmncSttn() { </div> </div> </ContentsDiv> + <Toaster position="top-center"/> </> ) } diff --git a/apps/wr/app/store/matDmd/coMatRvw/headList.tsx b/apps/wr/app/store/matDmd/coMatRvw/headList.tsx index 8caf7e1b2..571deb001 100644 --- a/apps/wr/app/store/matDmd/coMatRvw/headList.tsx +++ b/apps/wr/app/store/matDmd/coMatRvw/headList.tsx @@ -11,27 +11,27 @@ export const sttnHeadListType = z.array( export const coRvwHeadListExport: z.infer<typeof sttnHeadListType> = [ { - id: "ctpv", + id: "cityText", title: "시도", visible: true, }, { - id: "sgg", + id: "sggText", title: "시군구", visible: true, }, { - id: "coNm", + id: "dmdCoNm", title: "회사명", visible: true, }, { - id: "addr", + id: "daddr", title: "공장주소", visible: true, }, { - id: "telNo", + id: "telno", title: "전화번호", visible: true, }, diff --git a/apps/wr/app/store/matDmd/coMatRvw/index.tsx b/apps/wr/app/store/matDmd/coMatRvw/index.tsx index 906a7bedd..31d818ba5 100644 --- a/apps/wr/app/store/matDmd/coMatRvw/index.tsx +++ b/apps/wr/app/store/matDmd/coMatRvw/index.tsx @@ -2,6 +2,8 @@ import type { z } from "zod"; import type { sttnHeadListType } from "../coSttn/headList"; import { coRvwHeadListExport, coRvwNodeListExport } from "./headList"; import type { CommonTableProps } from "../../common/type/header"; +import type { DmdCoReqType } from "./type"; +import { fetchType, getFetch } from "@/components/lib/api"; const coRvwHeadList = coRvwHeadListExport; const coRvwNodeList = coRvwNodeListExport; @@ -9,26 +11,54 @@ const coRvwNodeList = coRvwNodeListExport; export type coRvwState = { coRvw: { isInit: boolean; - coRvwHeadList: z.infer<typeof sttnHeadListType>; + coMatRvwRes: DmdCoReqType[]; + coRvwHeadList: CommonTableProps[]; coRvwNodeList: CommonTableProps[]; - }; }; export const coRvwStateExport: coRvwState = { coRvw: { isInit: false, + coMatRvwRes: [], coRvwHeadList: coRvwHeadList, coRvwNodeList: coRvwNodeList, - } -} + }, +}; export type coRvwType = coRvwState & coRvwActions; type coRvwActions = { + coMatRvwInit: ( + pageCnt: number, + pageNo: number, + sggCd: string, + startYear: string, + endYear: string + ) => void; }; export const coRvwActionsExport: (set: any) => coRvwActions = (set: any) => { return { - } -} \ No newline at end of file + coMatRvwInit: async ( + pageCnt: number, + pageNo: number, + sggCd: string, + startYear: string, + endYear: string + ) => { + const tempData = `/reuseFc/request/10000000000000`; + const url = `/reuseFc/request/${pageNo}/${pageCnt}/${sggCd}/${startYear}/${endYear}}`; + const coMatRvwRes = await getFetch(fetchType.WR, tempData); + + return set((state: coRvwState) => ({ + ...state, + coRvw: { + ...state.coRvw, + init: false, + coMatRvwRes: [coMatRvwRes], + }, + })); + }, + }; +}; diff --git a/apps/wr/app/store/matDmd/coMatRvw/type.tsx b/apps/wr/app/store/matDmd/coMatRvw/type.tsx new file mode 100644 index 000000000..eeaaaf8f5 --- /dev/null +++ b/apps/wr/app/store/matDmd/coMatRvw/type.tsx @@ -0,0 +1,70 @@ +import { z } from "zod"; +const DmdInfoSchema = z.object({ + dmdInfoSn: z.number(), + dmdInfoFk: z.string(), + dmndTmng: z.coerce.date(), + dmndQty: z.number(), + wntUntprc: z.number(), + grssClfg: z.number(), + combResdch: z.number(), + trbt: z.number(), + blgcOxygDmndQnt: z.number(), + smll: z.number(), + crmty: z.number(), + tn: z.number(), + tph: z.number(), + ph: z.number(), + clIonQnt: z.number(), + cdtnv: z.number(), + rmrk: z.string(), + useUsgCd: z.string(), +}); +const DmdMatSchema = z.object({ + dmdInfoFk: z.string(), + splyFcltFk: z.string(), + splyFcltFlg: z.string(), + pbnstRuseFcltBizFk: z.number(), + splyBgngDay: z.coerce.date(), + splyEndDay: z.coerce.date(), + splyCpct: z.number(), + splyFmYn: z.string(), + useUsgCd: z.string(), +}); + +export const DmdCoReqSchema = + z.object({ + cityText:z.string().nullish(), + sggText:z.string().nullish(), + dmdInfoPk: z.string(), + dmdCoNm: z.string(), + ctpvCd: z.string(), + sggCd: z.string(), + daddr: z.string(), + splyBgngDay: z.coerce.date(), + splyEndDay: z.coerce.date(), + splyCpct: z.number(), + splyFmYn: z.string(), + telno: z.string(), + useUsgCd: z.string(), + regDt: z.coerce.date(), + rgtr: z.string(), + mdfcnDt: z.coerce.date(), + mdfr: z.string(), + dmdAplyPswd: z.string(), + demandInfo: z.array(DmdInfoSchema), + demandMatchings: z.array(DmdMatSchema), + }) + + + + +export type DmdCoReqType = z.infer<typeof DmdCoReqSchema>; +export type DmdMatTableType = { + cityText:string, + sggText:string, + dmdCoNm:string, + daddr:string, + telno:string, + regDt:string, + state:string +} \ No newline at end of file diff --git a/apps/wr/components/ui/form/fcltReg/pbnstReg/mngReg/mngRegForm.tsx b/apps/wr/components/ui/form/fcltReg/pbnstReg/mngReg/mngRegForm.tsx index bac6c6e38..66acb0bf8 100644 --- a/apps/wr/components/ui/form/fcltReg/pbnstReg/mngReg/mngRegForm.tsx +++ b/apps/wr/components/ui/form/fcltReg/pbnstReg/mngReg/mngRegForm.tsx @@ -9,7 +9,6 @@ import { } from "@common/business_components/ui"; import { Form, FormField } from "@common/business_components/ui/form"; import { Button, Input } from "@common/components"; -import { zodResolver } from "@hookform/resolvers/zod"; import { useEffect, useRef, useState } from "react"; import { useFieldArray, useForm, type UseFormReturn } from "react-hook-form"; import { z } from "zod"; @@ -19,12 +18,10 @@ import { formTableName, } from "@/components/lib/class/comClass"; import { TusClientUpload } from "@/components/lib/useTus_wr/useTusWr"; -import RuseMngTable from "@/components/ui/table/pbnstReg/ruseMngTable/ruseMngTable"; import { pbnstRegZod, type customPbnst, type fcFileType, - type operType, type PbnstRegArrrayType, type selectLabel, } from "@/app/store/ruseFcltMng/fcltReg/pbnstReg/type"; diff --git a/apps/wr/components/ui/modal/fcltReg/bdstRegModal/bdstRegModal.tsx b/apps/wr/components/ui/modal/fcltReg/bdstRegModal/bdstRegModal.tsx index 3d0eed82f..f60fb8620 100644 --- a/apps/wr/components/ui/modal/fcltReg/bdstRegModal/bdstRegModal.tsx +++ b/apps/wr/components/ui/modal/fcltReg/bdstRegModal/bdstRegModal.tsx @@ -10,7 +10,6 @@ import { useEffect, useState } from "react"; import { getCity, tableData } from "@/components/lib/func/commom"; import type { customRswtBdst } from "@/app/store/ruseFcltMng/fcltReg/rswtReg"; import type { customHtdflBdst } from "@/app/store/ruseFcltMng/fcltReg/htdflReg"; -import { headMakeColSpan } from "@/app/ruseFcltMng/fcltReg/rainReg/TableHead"; import RainRegForm from "@/components/ui/form/fcltReg/rainReg/rainRegForm"; import RswtrRegForm from "@/components/ui/form/fcltReg/rswtrReg/rswtrRegForm"; import HtdflRegForm from "@/components/ui/form/fcltReg/htdflReg/htdflRegForm"; diff --git a/apps/wr/components/ui/modal/fcltReg/fcOrgwtsRegModal/fcOrgwtsRegModal.tsx b/apps/wr/components/ui/modal/fcltReg/fcOrgwtsRegModal/fcOrgwtsRegModal.tsx index a6dd7bf2d..92b40e146 100644 --- a/apps/wr/components/ui/modal/fcltReg/fcOrgwtsRegModal/fcOrgwtsRegModal.tsx +++ b/apps/wr/components/ui/modal/fcltReg/fcOrgwtsRegModal/fcOrgwtsRegModal.tsx @@ -10,7 +10,6 @@ import { Button } from "@common/business_components/ui/table/lib/button"; import { Input } from "@common/components/ui"; import { ArrowLeft, ArrowRight } from "lucide-react"; import { useEffect, useRef, useState } from "react"; -import { useFieldArray } from "react-hook-form"; export default function FcOrgwtsRegModal({ onRightSet, closeModal }: { onRightSet?: (rightData:fcOrgwtType[]) => void,closeModal?:(val:boolean) =>void }) { const { code, pbnst, getSwtrmtFcltNm, searchFclts } = useWrStore((state) => state);