안쓰는 코드 삭제

This commit is contained in:
leedj312
2025-07-15 17:16:37 +09:00
parent 9a8abee77c
commit 2d5a08a271
@@ -1,7 +1,6 @@
import { txtSize } from "@/app/store/common/code/basicCode";
import type { PbnstRegArrrayType } from "@/app/store/ruseFcltMng/fcltReg/pbnstReg/type";
import { formH1Class } from "@/components/lib/class/comClass";
import { FormField, FormUi } from "@common/business_components/ui";
import { FormField, FormUi, SelectBox } from "@common/business_components/ui";
import { Input, Label } from "@common/components/ui";
import { useCallback, useEffect, useState } from "react";
import type { UseFormReturn } from "react-hook-form";
@@ -40,7 +39,7 @@ export function BuseWaterQulity({
form.getValues(`items.${indexMng}.pbnstRuseFcltId`) +
String(form.getValues(`items.${indexMng}.fcBizs.${indexBiz}.cycl`));
console.log('checkPkAndCycle ', checkPkAndCycle)
console.log("checkPkAndCycle ", checkPkAndCycle);
if (chekcPk !== checkPkAndCycle) {
if (watchPH && watchPH !== undefined) {
const [frontPH, backPH] = watchPH.split("~");
@@ -56,9 +55,7 @@ export function BuseWaterQulity({
}
setCheakPk(checkPkAndCycle);
}
}, [form.getValues(`items.${indexMng}.fcBizs.${indexBiz}.ph`),
chekcPk]);
}, [form.getValues(`items.${indexMng}.fcBizs.${indexBiz}.ph`), chekcPk]);
const isSetFrontPh = useCallback(
(frontPHdata: string) => {
@@ -71,11 +68,10 @@ export function BuseWaterQulity({
const MatchData = frontPHdata + "~" + backPH;
form.setValue(`items.${indexMng}.fcBizs.${indexBiz}.ph`, MatchData);
setFrontPHdata(frontPHdata);
}else{
const MatchData = frontPHdata+ "~" + '0';
form.setValue(`items.${indexMng}.fcBizs.${indexBiz}.ph`, MatchData);
setFrontPHdata(frontPHdata);
} else {
const MatchData = frontPHdata + "~" + "0";
form.setValue(`items.${indexMng}.fcBizs.${indexBiz}.ph`, MatchData);
setFrontPHdata(frontPHdata);
}
}
},
@@ -91,16 +87,16 @@ export function BuseWaterQulity({
if (PHdata) {
const frontPH = PHdata.split("~")[0];
const MatchData = frontPH + "~" + backPHdata
const MatchData = frontPH + "~" + backPHdata;
console.log(" backPHdata ", MatchData);
form.setValue(`items.${indexMng}.fcBizs.${indexBiz}.ph`, MatchData);
setBackPHdata(backPHdata);
} else {
const MatchData = "0" + "~" + backPHdata;
console.log(' backPHdata ', MatchData)
form.setValue(`items.${indexMng}.fcBizs.${indexBiz}.ph`, MatchData);
setBackPHdata(backPHdata);
}else{
const MatchData = '0' + "~" + backPHdata;
form.setValue(`items.${indexMng}.fcBizs.${indexBiz}.ph`, MatchData);
setBackPHdata(backPHdata);
}
}
},
@@ -134,7 +130,7 @@ export function BuseWaterQulity({
: ""
}
readOnly={formType === "sttn" ? true : false}
maxLength={txtSize}
maxLength={6}
/>
</FormUi>
)}
@@ -159,7 +155,7 @@ export function BuseWaterQulity({
}}
value={field.value ?? ""}
readOnly={formType === "sttn" ? true : false}
maxLength={txtSize}
maxLength={6}
/>
</FormUi>
)}
@@ -186,7 +182,7 @@ export function BuseWaterQulity({
: ""
}
readOnly={formType === "sttn" ? true : false}
maxLength={txtSize}
maxLength={6}
/>
</FormUi>
)}
@@ -213,7 +209,7 @@ export function BuseWaterQulity({
: ""
}
readOnly={formType === "sttn" ? true : false}
maxLength={txtSize}
maxLength={6}
/>
</FormUi>
)}
@@ -229,7 +225,7 @@ export function BuseWaterQulity({
key={`items.${indexMng}.fcBizs.${indexBiz}.smll-key`}
render={({ field }) => (
<FormUi label="냄새">
<Input
{/* <Input
className="!text-2xl"
placeholder=""
type="text"
@@ -239,7 +235,21 @@ export function BuseWaterQulity({
value={field.value ?? ""}
readOnly={formType === "sttn" ? true : false}
maxLength={txtSize}
/>
/> */}
<SelectBox
className={"!text-2xl"}
label={""}
selectClass={undefined}
selectArray={[
{ val: "불쾌하지않을것", text: "불쾌하지않을것" },
{ val: "없음", text: "없음" },
]}
readOnly={formType === "sttn" ? true : false}
onSelectValue={(val) => {
field.onChange(val);
}}
value={field.value||undefined}
></SelectBox>
</FormUi>
)}
/>
@@ -265,7 +275,7 @@ export function BuseWaterQulity({
: ""
}
readOnly={formType === "sttn" ? true : false}
maxLength={txtSize}
maxLength={6}
/>
</FormUi>
)}
@@ -292,7 +302,7 @@ export function BuseWaterQulity({
: ""
}
readOnly={formType === "sttn" ? true : false}
maxLength={txtSize}
maxLength={6}
/>
</FormUi>
)}
@@ -320,7 +330,7 @@ export function BuseWaterQulity({
: ""
}
readOnly={formType === "sttn" ? true : false}
maxLength={txtSize}
maxLength={6}
/>
</FormUi>
)}
@@ -347,7 +357,7 @@ export function BuseWaterQulity({
: ""
}
readOnly={formType === "sttn" ? true : false}
maxLength={txtSize}
maxLength={7}
/>
</FormUi>
)}
@@ -375,7 +385,7 @@ export function BuseWaterQulity({
: ""
}
readOnly={formType === "sttn" ? true : false}
maxLength={txtSize}
maxLength={7}
/>
</FormUi>
)}
@@ -394,7 +404,7 @@ export function BuseWaterQulity({
}
value={frontPHdata ?? ""}
readOnly={formType === "sttn"}
maxLength={txtSize}
maxLength={3}
/>
<span className="text-xl">~</span>
<Input
@@ -406,7 +416,7 @@ export function BuseWaterQulity({
}}
value={backPHdata ?? ""}
readOnly={formType === "sttn"}
maxLength={txtSize}
maxLength={3}
/>
</div>
</div>