wr: 항목 표출 변경

This commit is contained in:
dongsilove
2026-02-13 21:17:17 +09:00
parent a91bcd9cf7
commit f2a71893d4
6 changed files with 18 additions and 11 deletions
@@ -243,6 +243,7 @@ export default function HtdflSttn() {
...item, ...item,
visible: item.visible ?? false, visible: item.visible ?? false,
}))} }))}
onSaved={() => setIsChHead(false)}
/> />
} }
/> />
@@ -259,4 +260,3 @@ export default function HtdflSttn() {
</> </>
); );
} }
@@ -236,6 +236,7 @@ export default function PbnstSttn() {
...item, ...item,
visible: item.visible ?? false, visible: item.visible ?? false,
}))} }))}
onSaved={() => setIsChHead(false)}
/> />
} }
/> />
@@ -261,4 +262,3 @@ export default function PbnstSttn() {
</> </>
); );
} }
@@ -284,9 +284,7 @@ export default function RainSttn() {
</div> </div>
<UiModal <UiModal
open={isChHead} open={isChHead}
onOpenChange={() => { onOpenChange={() => setIsChHead(!isChHead)}
setIsChHead(!isChHead);
}}
bodyClass={""} bodyClass={""}
body={ body={
<HeadChModal <HeadChModal
@@ -295,6 +293,7 @@ export default function RainSttn() {
...item, ...item,
visible: item.visible ?? false, visible: item.visible ?? false,
}))} }))}
onSaved={() => setIsChHead(false)}
/> />
} }
/> />
@@ -303,7 +302,7 @@ export default function RainSttn() {
onOpenChange={() => { onOpenChange={() => {
setDetailModal({ ...detailModal, isOpen: !detailModal.isOpen }); setDetailModal({ ...detailModal, isOpen: !detailModal.isOpen });
}} }}
bodyClass={"w-[40vw] max-w-none max-h-[calc(100%-70px)]"} bodyClass={"w-[40vw] max-w-none max-h-[calc(100%-70px)] overflow-y-auto"}
body={<SttnDetailModal type={"RNB"} formObj={detailModal.data} />} body={<SttnDetailModal type={"RNB"} formObj={detailModal.data} />}
/> />
</ContentsDiv> </ContentsDiv>
@@ -311,4 +310,3 @@ export default function RainSttn() {
</> </>
); );
} }
@@ -246,6 +246,7 @@ export default function RswtSttn() {
visible: item.visible ?? false, visible: item.visible ?? false,
}))} }))}
type={"RST"} type={"RST"}
onSaved={() => setIsChHead(false)}
/> />
} }
/> />
@@ -263,4 +264,3 @@ export default function RswtSttn() {
</> </>
); );
} }
@@ -7,7 +7,15 @@ import { useEffect } from "react";
import { useForm } from "react-hook-form"; import { useForm } from "react-hook-form";
import { z } from "zod"; import { z } from "zod";
export default function HeadChModal({ headList, type }: { headList: z.infer<typeof sttnHeadListType>, type: string }) { export default function HeadChModal({
headList,
type,
onSaved,
}: {
headList: z.infer<typeof sttnHeadListType>;
type: string;
onSaved?: () => void;
}) {
const { rainChSttnHead, rswtChSttnHead, htdflChSttnHead, pbnstChSttnHead } = useWrStore((state) => state); const { rainChSttnHead, rswtChSttnHead, htdflChSttnHead, pbnstChSttnHead } = useWrStore((state) => state);
@@ -44,11 +52,12 @@ export default function HeadChModal({ headList, type }: { headList: z.infer<type
} else if (type === 'PBN') { } else if (type === 'PBN') {
pbnstChSttnHead(valueList) pbnstChSttnHead(valueList)
} }
onSaved?.();
} }
return ( return (
<> <>
<div> <div className="max-h-[95vh] overflow-y-auto">
<Form {...form}> <Form {...form}>
<form onSubmit={form.handleSubmit(onSubmit)} className="space-y-6"> <form onSubmit={form.handleSubmit(onSubmit)} className="space-y-6">
@@ -79,7 +79,7 @@ export default function SttnDetailModal({
}, []); }, []);
return ( return (
<div> <div className="">
<Title <Title
title={ title={
type === "RNB" type === "RNB"