@@ -6,6 +6,11 @@ import {
|
||||
type chHeadType,
|
||||
type rainChkZodType,
|
||||
} from "@/app/store/prfmncReg/chkgdnReg/rainChkgdn";
|
||||
import type { TableUpperProps } from "@/app/store/ruseFcltMng/fcltReg/rainReg";
|
||||
import ChkgdExcel from "@/components/ui/modal/chkgdExcel/chkgdExcel";
|
||||
import ChkgdModal from "@/components/ui/modal/chkgdModal/chkgdModal";
|
||||
import RainChkgdTable from "@/components/ui/table/chkgdTable/rainChkgd/rainChkgdTable";
|
||||
import RswtChkgdTable from "@/components/ui/table/chkgdTable/rswtChkgd/rswtChkgdTable";
|
||||
import {
|
||||
ContentsDiv,
|
||||
SearchDiv,
|
||||
@@ -14,19 +19,12 @@ import {
|
||||
SearchInput,
|
||||
SelectBox,
|
||||
Title,
|
||||
UiModal,
|
||||
UiTable,
|
||||
UiModal
|
||||
} from "@common/business_components/ui";
|
||||
import ListDiv from "@common/business_components/ui/list_div";
|
||||
import { Button, Input } from "@common/components/ui";
|
||||
import { TableHead, TableRow } from "@common/components";
|
||||
import { Button } from "@common/components/ui";
|
||||
import { useEffect, useState } from "react";
|
||||
import { TableRow, TableHead } from "@common/components";
|
||||
import React from "react";
|
||||
import type { TableUpperProps } from "@/app/store/ruseFcltMng/fcltReg/rainReg";
|
||||
import RainChkgdTable from "@/components/ui/table/chkgdTable/rainChkgd/rainChkgdTable";
|
||||
import RswtChkgdTable from "@/components/ui/table/chkgdTable/rswtChkgd/rswtChkgdTable";
|
||||
import ChkgdModal from "@/components/ui/modal/chkgdModal/chkgdModal";
|
||||
import ChkgdExcel from "@/components/ui/modal/chkgdExcel/chkgdExcel";
|
||||
|
||||
export const headMakeprfmnc = (
|
||||
upHeadList: TableUpperProps[],
|
||||
@@ -80,11 +78,10 @@ export const headMakeprfmnc = (
|
||||
//-----------------------
|
||||
export default function Page() {
|
||||
|
||||
const { rainChkgdn, code, rainChkInit,rainChkDetilUpdate } = useWrStore((state) => {
|
||||
const { rainChkgdn, rainChkInit,rainChkDetilUpdate } = useWrStore((state) => {
|
||||
return state;
|
||||
});
|
||||
|
||||
const {rainChk} =rainChkgdn
|
||||
const [isDetail, setIsDetail] = useState(false);
|
||||
const [isExcel, setIsExcel] = useState(false);
|
||||
const [searchTxt, setSearchTxt] = useState<string>();
|
||||
|
||||
@@ -2,6 +2,7 @@ import { rainRegExcel } from "@/app/store/prfmncReg/chkgdnReg/rainChkgdn";
|
||||
import { selectClass } from "@/app/store/ruseFcltMng/fcltReg/rainReg";
|
||||
import {
|
||||
DatePicker,
|
||||
filePicked,
|
||||
FileUpload,
|
||||
Form,
|
||||
FormField,
|
||||
@@ -10,7 +11,7 @@ import {
|
||||
} from "@common/business_components/ui";
|
||||
import { Button } from "@common/components/ui";
|
||||
import { zodResolver } from "@hookform/resolvers/zod";
|
||||
import { useState } from "react";
|
||||
import { useEffect, useState } from "react";
|
||||
import { useForm } from "react-hook-form";
|
||||
import type { z } from "zod";
|
||||
|
||||
@@ -29,6 +30,16 @@ export default function ChkgdExcel({ type }: { type: string }) {
|
||||
const onChangeDate = (val: Date | undefined) => {
|
||||
if (val) setDmdDate(val);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
if (files) {
|
||||
const file = files[0];
|
||||
console.log(files);
|
||||
filePicked(file);
|
||||
}else{
|
||||
|
||||
}
|
||||
}, [files])
|
||||
return (
|
||||
<>
|
||||
<div>
|
||||
@@ -79,7 +90,7 @@ export default function ChkgdExcel({ type }: { type: string }) {
|
||||
<FileUpload
|
||||
files={field.value}
|
||||
setFiles={setFiles}
|
||||
fileTypes="excel"
|
||||
fileTypes="xlsx"
|
||||
></FileUpload>
|
||||
</FormUi>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user