diff --git a/apps/wr/app/loading.jsx b/apps/wr/app/loading.jsx
deleted file mode 100644
index 5d639b857..000000000
--- a/apps/wr/app/loading.jsx
+++ /dev/null
@@ -1,10 +0,0 @@
-export default function loading (){
-
- return(
- <>
-
- 'test'
-
- >
- )
-}
\ No newline at end of file
diff --git a/apps/wr/app/loading.tsx b/apps/wr/app/loading.tsx
new file mode 100644
index 000000000..80b268890
--- /dev/null
+++ b/apps/wr/app/loading.tsx
@@ -0,0 +1,4 @@
+export default function Loading() {
+ return 페이지 불러오는 중입니다...
;
+ }
+
\ No newline at end of file
diff --git a/apps/wr/app/ruseFcltMng/fcltReg/rainReg/page.tsx b/apps/wr/app/ruseFcltMng/fcltReg/rainReg/page.tsx
index 4dedd354f..df5d2c285 100644
--- a/apps/wr/app/ruseFcltMng/fcltReg/rainReg/page.tsx
+++ b/apps/wr/app/ruseFcltMng/fcltReg/rainReg/page.tsx
@@ -59,12 +59,14 @@ export default function Home() {
});
const { rainRes } = rain;
const [rainForm, setRainForm] = useState();
- const [issNewReg,setIsNewReg] = useState( false);
+ const [issNewReg, setIsNewReg] = useState(false);
const [bdstTable, setbdstTable] = useState();
const [searchTxt, setSearchTxt] = useState();
- const [bdstChgProps, setBdstChgProps] = useState<{isOpen:boolean,chgBuilding:chgBuilding[]}>({isOpen:false,chgBuilding:[] });
-
+ const [bdstChgProps, setBdstChgProps] = useState<{
+ isOpen: boolean;
+ chgBuilding: chgBuilding[];
+ }>({ isOpen: false, chgBuilding: [] });
const nodeList = headMakeColSpan(rain.upHeadList);
useEffect(() => {
@@ -82,32 +84,31 @@ export default function Home() {
val,
headId
) => {
- if ( val !== undefined) {
- setRainForm(rainRes[val]);
+ if (val !== undefined) {
+ setRainForm(rainRes[val]);
}
if (headId === "bdstChgYn" && val !== undefined) {
-
- if (rainRes[val]?.bdstInfoPk != null && rainRes[val]?.chgBuilding.length > 0) {
+ if (
+ rainRes[val]?.bdstInfoPk != null &&
+ rainRes[val]?.chgBuilding.length > 0
+ ) {
bdstChgModal(rainRes[val].chgBuilding);
-
}
}
};
- const bdstChgModal = (chgBuilding:chgBuilding[] ) => {
- setBdstChgProps( {isOpen:true, chgBuilding:chgBuilding } );
-
+ const bdstChgModal = (chgBuilding: chgBuilding[]) => {
+ setBdstChgProps({ isOpen: true, chgBuilding: chgBuilding });
};
- useEffect(()=>{
+ useEffect(() => {
console.log("rainForm", rainForm);
- },[rainForm])
-
+ }, [rainForm]);
return (
<>
-
+
@@ -137,59 +138,57 @@ export default function Home() {
>
신규등록
-
-
-
-
-
- {
- cellClick(val, headId);
- }}
- >
- {nodeList}
-
+
+
+
+
+ {
+ cellClick(val, headId);
+ }}
+ >
+ {nodeList}
+
-
}
- bodyClass="w-[90vw] max-w-none"
- open={issNewReg}
- onOpenChange={(open) => {
- setIsNewReg(open);
- }}
- />
-
+ body={}
+ bodyClass="w-[90vw] max-w-none"
+ open={issNewReg}
+ onOpenChange={(open) => {
+ setIsNewReg(open);
+ }}
+ />
+
}
- onOpenChange={(open) => {
- setBdstChgProps({ ...bdstChgProps, isOpen: open });
- }
- }
- />
+ bodyClass={""}
+ open={bdstChgProps.isOpen}
+ body={
+
+ }
+ onOpenChange={(open) => {
+ setBdstChgProps({ ...bdstChgProps, isOpen: open });
+ }}
+ />
>
);
diff --git a/apps/wr/app/ruseFcltMng/fcltSttn/pbnstSttn/page.tsx b/apps/wr/app/ruseFcltMng/fcltSttn/pbnstSttn/page.tsx
index b0ce1a124..1e11470a0 100644
--- a/apps/wr/app/ruseFcltMng/fcltSttn/pbnstSttn/page.tsx
+++ b/apps/wr/app/ruseFcltMng/fcltSttn/pbnstSttn/page.tsx
@@ -7,15 +7,20 @@ import {
SearchFormRight,
SelectBox,
Title,
+ UiModal,
UiTable,
} from "@common/business_components/ui";
import ListDiv from "@common/business_components/ui/list_div";
import { Button } from "@common/components/ui";
import { headMakeprfmnc } from "../../prfmncReg/chkgdnReg/page";
+import HeadChModal from "@/components/ui/modal/headChModal/headChModal";
+import { useState } from "react";
export default function PbnstSttn() {
const { code,pbnStt } = useWrStore((state) => state);
+
+ const [isChHead, setIsChHead] = useState(false);
const nodeList = headMakeprfmnc(pbnStt.pbnSttHeadList, pbnStt.pbnSttHeadNm);
return (
@@ -82,7 +87,9 @@ export default function PbnstSttn() {
-
+
{setIsChHead(!isChHead)}} bodyClass={""} body={}/>
+
+
+
+
+
+
>
);
diff --git a/apps/wr/app/store/ruseFcltMng/fcltSttn/pbnstSttn/index.tsx b/apps/wr/app/store/ruseFcltMng/fcltSttn/pbnstSttn/index.tsx
index 2a9c00b05..b3cd56fe5 100644
--- a/apps/wr/app/store/ruseFcltMng/fcltSttn/pbnstSttn/index.tsx
+++ b/apps/wr/app/store/ruseFcltMng/fcltSttn/pbnstSttn/index.tsx
@@ -42,13 +42,7 @@ export const pbnSttHeadList:TableUpperProps[] = [
];
- export const headVisibleSchema = z.array(
- z.object(
- Object.fromEntries(
- pbnSttHeadList.map(col => [col.id, z.boolean()])
- ))
- );
-
+
diff --git a/apps/wr/components/ui/modal/headChModal/headChModal.tsx b/apps/wr/components/ui/modal/headChModal/headChModal.tsx
new file mode 100644
index 000000000..da4e090ae
--- /dev/null
+++ b/apps/wr/components/ui/modal/headChModal/headChModal.tsx
@@ -0,0 +1,95 @@
+import { useWrStore } from "@/app/store";
+import { pbnSttHeadList } from "@/app/store/ruseFcltMng/fcltSttn/pbnstSttn";
+import { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage } from "@common/business_components/ui";
+import { Button, Checkbox } from "@common/components/ui";
+import { zodResolver } from "@hookform/resolvers/zod";
+import { useForm } from "react-hook-form";
+import { z } from "zod";
+
+export default function HeadChModal() {
+ const { pbnStt } = useWrStore((state) => state);
+
+
+
+ const items = pbnSttHeadList.map(item => ({id:item.id, label:item.title}));
+
+
+
+
+ const FormSchema = z.object({
+ items: z.array(z.string()).refine((value) => value.some((item) => item), {
+ message: "You have to select at least one item.",
+ }),
+ })
+
+ const form = useForm>({
+ resolver: zodResolver(FormSchema),
+ })
+
+
+
+ const onSubmit = (val : z.infer) =>{
+
+ console.log(val)
+ }
+
+ return (
+ <>
+
+ >
+ );
+}