Merge commit 'ed5fa161f56b2d0f34abaa138d7df04292e55f07' into iipbs/wr/form_fuction
iipbs_wr / build (push) Waiting to run
iipbs_wr / build (push) Waiting to run
This commit is contained in:
@@ -15,6 +15,7 @@ import {
|
||||
Form,
|
||||
FormField,
|
||||
FormUi,
|
||||
SelectBox,
|
||||
Title,
|
||||
} from "@common/business_components/ui";
|
||||
import { Button, Input } from "@common/components/ui";
|
||||
@@ -37,7 +38,19 @@ export default function ChkgdExcel({ type }: { type: string }) {
|
||||
>();
|
||||
const [excelRswtData, setExcelRswtData] = useState<rswtChkZodType[]>();
|
||||
|
||||
const defaultValues: z.infer<typeof chkgdRegExcel> = chkgdRegExcel.parse({});
|
||||
const currentYear = new Date().getFullYear();
|
||||
const startYear = 1970;
|
||||
const yearOptions: { val: string; text: string }[] = Array.from(
|
||||
{ length: currentYear - startYear + 1 },
|
||||
(_, i) => {
|
||||
const y = startYear + i;
|
||||
return { val: String(y), text: `${y}년` };
|
||||
}
|
||||
);
|
||||
|
||||
const defaultValues: z.infer<typeof chkgdRegExcel> = chkgdRegExcel.parse({
|
||||
chckYr: String(currentYear)
|
||||
});
|
||||
|
||||
const form = useForm<z.infer<typeof chkgdRegExcel>>({
|
||||
resolver: zodResolver(chkgdRegExcel),
|
||||
@@ -178,8 +191,8 @@ export default function ChkgdExcel({ type }: { type: string }) {
|
||||
></Title>
|
||||
</div>
|
||||
<div className="flex justify-between">
|
||||
<h3 className="text-2xl font-bold text-gray-900">
|
||||
{"○점검정보 입력"}
|
||||
<h3 className="text-2xl font-bold text-gray-900 mt-1 ml-7">
|
||||
{"점검정보 입력"}
|
||||
</h3>
|
||||
|
||||
<Button className="" type="submit">
|
||||
@@ -193,11 +206,13 @@ export default function ChkgdExcel({ type }: { type: string }) {
|
||||
name="chckYr"
|
||||
render={({ field }) => (
|
||||
<FormUi label="등록년도">
|
||||
<Input
|
||||
className={`text-3xl`}
|
||||
type="text"
|
||||
<SelectBox
|
||||
className="w-1/4 text-3xl"
|
||||
selectClass={""}
|
||||
label=""
|
||||
selectArray={yearOptions}
|
||||
value={field.value}
|
||||
onChange={field.onChange}
|
||||
onSelectValue={(val) => field.onChange(String(val))}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
|
||||
@@ -224,14 +224,14 @@ export default function ChkgdModal({ type, obj }: { type: string; obj: any }) {
|
||||
<Title
|
||||
title={
|
||||
type === "RNB"
|
||||
? "빗물이용시설"
|
||||
: "중수도 이용시설" + "지도점검 결과등록"
|
||||
? "빗물이용시설 " + "지도점검 결과등록"
|
||||
: "중수도 이용시설 " + "지도점검 결과등록"
|
||||
}
|
||||
></Title>
|
||||
</div>
|
||||
<div className="flex justify-between">
|
||||
<h3 className="text-2xl font-bold text-gray-900">
|
||||
{"○" + "" + `(${obj.bdstNm})`}
|
||||
<h3 className="text-2xl font-bold text-gray-900 mt-2 ml-6">
|
||||
{`(${obj.bdstNm})`}
|
||||
</h3>
|
||||
{!rainChkSttn.isSttn ? (
|
||||
<Button className="" onClick={allDataUpdate}>
|
||||
|
||||
Reference in New Issue
Block a user