등록 작업중
This commit is contained in:
@@ -121,4 +121,7 @@ export const ruseWaterQulityList:formDetailType[]=[
|
||||
{id:'ph' , lable:'수소이온농도'},
|
||||
{id:'clIonQnt' , lable:'염화물(mg/L)'},
|
||||
{id:'cdtnv' , lable:'전기전도도(μs/cm)'},
|
||||
]
|
||||
]
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -75,23 +75,23 @@ const fcOperSchema = z.object({
|
||||
operMthd: z.string(),
|
||||
rprtvBzenty: z.string(),
|
||||
bgngDt: z.string(),
|
||||
endDt: z.string(),
|
||||
endDt: z.string().default("20250501"),
|
||||
regDt: z.date().nullish(),
|
||||
rgtr: z.string(),
|
||||
mdfcnDt: z.date(),
|
||||
mdfcnDt: z.date().nullish(),
|
||||
mdfr: z.string().default("test"),
|
||||
});
|
||||
|
||||
const fcOrgwtSchema = z.object({
|
||||
pbnstRuseFcltBizFk: z.number().default(0),
|
||||
swtrmtFcltFk: z.number().default(0),
|
||||
swtrmtFcltFk: z.string().default(''),
|
||||
orgwtWtritQnt: z.string(),
|
||||
tmsYn: z.string(),
|
||||
dschgFmYn: z.string(),
|
||||
dtlPstnExpln: z.string(),
|
||||
regDt: z.date().nullish(),
|
||||
regDt: z.string().nullish(),
|
||||
rgtr: z.string(),
|
||||
mdfcnDt: z.date().nullish(),
|
||||
mdfcnDt: z.string().nullish(),
|
||||
mdfr: z.string(),
|
||||
});
|
||||
|
||||
@@ -414,7 +414,7 @@ export const exampleData = {
|
||||
fcOrgwts: [
|
||||
{
|
||||
pbnstRuseFcltBizFk: 11,
|
||||
swtrmtFcltFk: 1,
|
||||
wtrmtFcltFk: "11000SW001R",
|
||||
orgwtWtritQnt: "152",
|
||||
tmsYn: "Y",
|
||||
dschgFmYn: "N",
|
||||
@@ -424,7 +424,7 @@ export const exampleData = {
|
||||
},
|
||||
{
|
||||
pbnstRuseFcltBizFk: 11,
|
||||
swtrmtFcltFk: 1,
|
||||
wtrmtFcltFk: "11000SW001R",
|
||||
orgwtWtritQnt: "150",
|
||||
tmsYn: "Y",
|
||||
dschgFmYn: "N",
|
||||
@@ -445,7 +445,6 @@ export const exampleData = {
|
||||
operMthd: "위탁",
|
||||
rprtvBzenty: "기관명",
|
||||
bgngDt: "20230930",
|
||||
mdfcnDt:"20231230",
|
||||
rgtr: TEST_UUID,
|
||||
mdfr: TEST_UUID,
|
||||
},
|
||||
|
||||
@@ -25,16 +25,6 @@ import { TusClientUpload } from "@/components/lib/useTus_wr/useTusWr";
|
||||
import type { Upload } from "tus-js-client";
|
||||
import { pbnstRegZod, type customPbnst, type fcltOperInfoType, type operType, type ruseFcltType } from "@/app/store/ruseFcltMng/fcltReg/pbnstReg/type";
|
||||
|
||||
const formSchema = z.object({
|
||||
fcltNm: z.string().min(2).max(50),
|
||||
psysScdg: z.string(),
|
||||
designScdg: z.string(),
|
||||
fcltCpct: z.number(),
|
||||
swtrmtCpct: z.number(),
|
||||
ruseCpct: z.number(),
|
||||
splyExtraCpct: z.number(),
|
||||
});
|
||||
|
||||
export function PbnstMngForm({ data }: { data: customPbnst }) {
|
||||
const { pbnst, pbnstUpdate } = useWrStore((state) => state);
|
||||
const { pbnstMngUpHeadList} = pbnst;
|
||||
@@ -54,7 +44,7 @@ export function PbnstMngForm({ data }: { data: customPbnst }) {
|
||||
|
||||
const form = useForm<z.infer<typeof pbnstRegZod>>({
|
||||
resolver: zodResolver(pbnstRegZod),
|
||||
defaultValues: {...data},
|
||||
defaultValues: pbnstRegZod.parse({}),
|
||||
});
|
||||
|
||||
const { fields: fcOpersField } = useFieldArray({
|
||||
@@ -71,7 +61,10 @@ export function PbnstMngForm({ data }: { data: customPbnst }) {
|
||||
|
||||
// 2. Define a submit handler.
|
||||
function onSubmit(values: z.infer<typeof pbnstRegZod>) {
|
||||
console.log(values);
|
||||
|
||||
|
||||
console.log("onSubmit values", values);
|
||||
console.log( ' 212 ', values);
|
||||
|
||||
pbnstUpdate(values);
|
||||
}
|
||||
@@ -93,6 +86,9 @@ export function PbnstMngForm({ data }: { data: customPbnst }) {
|
||||
},
|
||||
});
|
||||
};
|
||||
useEffect(() => {
|
||||
console.log("form errors:", form.formState.errors);
|
||||
}, [form.formState.errors]);
|
||||
|
||||
useEffect(() => {
|
||||
if (relationfiles && relationfiles[0])
|
||||
@@ -120,7 +116,7 @@ export function PbnstMngForm({ data }: { data: customPbnst }) {
|
||||
<span className="mt-4 ml-2">{form.getValues("ruseUtztnFcltNm") ? ": " + form.getValues("ruseUtztnFcltNm") : ""}</span>
|
||||
</div>
|
||||
|
||||
<Button size={commonButonSize}>저장</Button>
|
||||
<Button type="submit" size={commonButonSize}>저장</Button>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user