하수재이용시설등록 결함 수정 중
iipbs_wr / build (push) Waiting to run

This commit is contained in:
jyha00
2025-07-07 16:25:26 +09:00
parent 02ada9925a
commit 37eb11f303
6 changed files with 50 additions and 45 deletions
@@ -50,7 +50,7 @@ export const pbnstOrgwtHeadListRxport: TableUpperProps[] = [
{ id: "orgwtWtritQnt", title: "원수취수량" },
{ id: "tmsYn", title: "하수처리량TMS 전후" },
{ id: "dschgFmYn", title: "하수처리장 방류 유량계 전·후​" },
{ id: "dtlPstnExpln", title: "상세위치 설명" },
{ id: "dtlPstnExpln", title: "상세위치", edit: true },
];
export const fcOrgwtsHeadListExport: TableUpperProps[] = [
{ id: "choose", title: "선택", type: "checkbox" },
@@ -124,6 +124,7 @@ if(searchTxt){
const hasuList = rainRes.data.map((item: any) => {
return {
...item,
fctCpc: Number(item.fctCpc) || 0,
ruse: item.ruse === false ? "N" : "Y",
};
});
@@ -181,6 +182,7 @@ export const pubFacActionsExport: (set: any) => pubFacActions = (set: any) => {
const pbnstHasuRes = await hasuListFetch(page, sggOrCity);
return set((state: pubFacState) => ({
...state,
pbnst: {
@@ -64,7 +64,7 @@ export function PbnstMngForm({
const {
fields: fcOpersField,
append,
prepend,
remove,
} = useFieldArray({
control: form.control,
@@ -77,7 +77,7 @@ export function PbnstMngForm({
});
const plusHist = () => {
append({
prepend({
choose: false,
pbnstRuseFcltFk:
form.getValues(`items.${indexMng}.pbnstRuseFcltPk`) ?? "",
@@ -310,42 +310,43 @@ export function PbnstMngForm({
</div>
<div>
{/* <div className="h-[200px] overflow-y-auto"> */}
<div className="flex justify-between items-center mx-3 mb-3">
<span className={formTableName}>재이용시설 운영정보</span>
{formType === "sttn" ? (
<></>
) : (
<div>
<Button
type="button"
size={commonButonSize}
className="!text-xl"
onClick={plusHist}
>
추가등록
</Button>
<Button
type="button"
size={commonButonSize}
className="!text-xl !bg-red-500 !text-white ml-1"
onClick={removeSelected}
>
삭제
</Button>
</div>
)}
</div>
<div className="h-[200px] overflow-y-auto">
<div className="flex justify-between items-center mx-3 mb-3">
<span className={formTableName}>재이용시설 운영정보</span>
{formType === "sttn" ? (
<></>
) : (
<div>
<Button
type="button"
size={commonButonSize}
className="!text-xl"
onClick={plusHist}
>
추가등록
</Button>
<Button
type="button"
size={commonButonSize}
className="!text-xl !bg-red-500 !text-white ml-1"
onClick={removeSelected}
>
삭제
</Button>
</div>
)}
</div>
<RuseMngTableForm
tableData={form.getValues(`items.${indexMng}.fcOpers`) || []}
tableData={fcOpersField}
headList={
formType === "sttn"
? pbnst.pbnstMngUpHeadList.map((item) => {
return {
...item,
readonly: true,
};
})
return {
...item,
readonly: true,
};
})
: pbnst.pbnstMngUpHeadList
}
upHeadList={pbnst.pbnstMngNm}
@@ -356,7 +357,7 @@ export function PbnstMngForm({
indexMng={indexMng}
form={form}
formNm={"fcOpers"}
// ref={ref}
// ref={ref}
></RuseMngTableForm>
</div>
</div>
@@ -13,7 +13,7 @@ import {
} from "@/components/lib/func/commom";
import { DatePicker, FormUi } from "@common/business_components";
import { Form, FormField, SelectBox } from "@common/business_components/ui";
import { Button, Checkbox, Input, Label } from "@common/components/ui";
import { Button, Checkbox, Input, Label, ScrollArea } from "@common/components/ui";
import { zodResolver } from "@hookform/resolvers/zod";
import { useEffect, useState } from "react";
import { useForm } from "react-hook-form";
@@ -158,6 +158,7 @@ export default function RainRegForm({
)}
</div>
</div>
<ScrollArea className="h-[37vh]">
{isModal && rainForm != undefined ? <BdstReg form={form} /> : <></>}
{isModal ? (
<h1 className="pl-3 text-xl col-span-10 mt-4">
@@ -583,6 +584,7 @@ export default function RainRegForm({
/>
</div>
</div>
</ScrollArea>
</form>
</Form>
</div>
@@ -114,7 +114,7 @@ export function BdstReg<T extends MoType>({ moType,setIsModal,isModal }: BdstReg
>
{" "}
</SelectBox>
<Label className="w-full text-xl text-gray-600 text-right">건축물명</Label>
<Label className="w-full text-xl text-gray-600 text-right">시설명</Label>
<Input className="w-full h-full !text-xl col-span-2 col-start-8" type="text" value={searchTxt || ''} onChange={(e) => setSearchTxt(e.target.value)}/>
<Button className="" size={"sm"} onClick={()=>{searchBdst(searchTxt)}}>조회</Button>
</div>
@@ -142,7 +142,7 @@ export function BdstReg<T extends MoType>({ moType,setIsModal,isModal }: BdstReg
</div>
</ScrollArea>
<div className="border-t border-gray-300 my-4"></div>
<ScrollArea className="h-[40vh]">
{/* <ScrollArea className="h-[40vh]"> */}
<div>
{ moType === 'RNB'?
<RainRegForm rainForm={rainBdstForm as customRainBdst} isModal={isModal} setIsModal={setIsModal} />
@@ -152,7 +152,7 @@ export function BdstReg<T extends MoType>({ moType,setIsModal,isModal }: BdstReg
}
</div>
</ScrollArea>
{/* </ScrollArea> */}
</div>
</>
);
@@ -76,20 +76,20 @@ const RuseMngTableForm = React.forwardRef<any, RuseMngTableProps>(
<TableBody>
{tableData.map((item, i) => (
<TableRow key={i}>
<TableRow key={item.id}>
{headList.map((head, j) => (
<TableCell
key={`${head.id}-${j}`}
className="text-center whitespace-nowrap"
onClick={() => {}}
onClick={() => { }}
>
<FormField
control={form.control}
name={
typeof indexMng === "number" &&
indexMng >= 0 &&
typeof indexBiz === "number" &&
indexBiz >= 0
indexMng >= 0 &&
typeof indexBiz === "number" &&
indexBiz >= 0
? `items.${indexMng}.fcBizs.${indexBiz}.${formNm}.${i}.${head.id}`
: typeof indexMng === "number" && indexMng >= 0
? `items.${indexMng}.${formNm}.${i}.${head.id}`
@@ -134,7 +134,7 @@ const RuseMngTableForm = React.forwardRef<any, RuseMngTableProps>(
}
}}
readOnly={head.readonly ? true : false}
// Disabled prop removed as SelectBox does not support it
// Disabled prop removed as SelectBox does not support it
></SelectBox>
) : head.type === "date" ? (
<DatePicker