// material-ui import { Button, CardContent, Grid, TextField, Typography, Checkbox, FormControlLabel, } from '@mui/material'; import MainCard from "../../../components/MainCard"; import { useForm } from "react-hook-form"; import { useState } from "react"; import * as React from "react"; import * as UrlUtils from "../../../utils/ApiPathConst"; import * as HttpUtils from "../../../utils/HttpUtils"; // ==============================|| DASHBOARD - DEFAULT ||============================== // const OrganizationSearchForm = ({ applySearch }) => { const [type, setType] = useState([]); const { reset, register, handleSubmit } = useForm() const onSubmit = (data) => { let typeArray = []; for (let i = 0; i < type.length; i++) { typeArray.push(type[i].label); } const temp = { brNo: data.brNo, enCompanyName: data.enCompanyName, chCompanyName: data.chCompanyName, searchCreditor: data.searchCreditor }; applySearch(temp); }; function resetForm() { setType([]); reset(); } const doExport=()=>{ HttpUtils.fileDownload({ url: UrlUtils.GET_ORG_EXPORT }); } return (
{/*row 1*/} Search Form {/*row 2*/} } label="Search Creditor Only" id="searchCreditor" /> {/*last row*/}
); }; export default OrganizationSearchForm;