// ** React Imports import { useState, ChangeEvent, MouseEvent, forwardRef, ForwardedRef } from "react"; // ** Next Imports import Link from "next/link"; import { GetStaticProps, InferGetStaticPropsType } from "next/types"; // ** MUI Imports import Box from "@mui/material/Box"; import Card from "@mui/material/Card"; import Menu from "@mui/material/Menu"; import Grid from "@mui/material/Grid"; import { styled } from "@mui/material/styles"; import MenuItem from "@mui/material/MenuItem"; import IconButton from "@mui/material/IconButton"; import Typography from "@mui/material/Typography"; import { DataGrid, GridColDef } from "@mui/x-data-grid"; // ** Icon Imports import Icon from "src/@core/components/icon"; // ** Store Imports import { useDispatch } from "react-redux"; // ** Types Imports import { AppDispatch } from "src/store"; import { ThemeColor } from "src/@core/layouts/types"; import { ScheduleType } from "src/types/apps/scheduleTypes"; import RadioGroup from "@mui/material/RadioGroup"; import Radio from "@mui/material/Radio"; import FormControlLabel from "@mui/material/FormControlLabel"; import Button from "@mui/material/Button"; import TextField from "@mui/material/TextField"; import DatePicker from 'react-datepicker' import DatePickerWrapper from 'src/@core/styles/libs/react-datepicker' import InputAdornment from '@mui/material/InputAdornment' import FormHelperText from "@mui/material/FormHelperText"; import * as yup from "yup"; import { useForm, Controller } from "react-hook-form"; import { yupResolver } from "@hookform/resolvers/yup"; import FormControl from "@mui/material/FormControl"; import { DateType } from 'src/types/forms/reactDatepickerTypes' interface FormData { dateStart: string; dateEnd: string; customerType: string; } const schema = yup.object().shape({ dateStart: yup.string().required(), dateEnd: yup.string().required(), customerType: yup.string().required(), }); const CustomInputStart = forwardRef(({ ...props }, ref: ForwardedRef) => { return ) }} {...props} /> }) CustomInputStart.displayName = 'CustomInputStart' const CustomInputEnd = forwardRef(({ ...props }, ref: ForwardedRef) => { return ) }} {...props} /> }) CustomInputEnd.displayName = 'CustomInputEnd' const Schedule = () => { // ** Hooks const dispatch = useDispatch(); const [dateStart, setDateStart] = useState(new Date()) const [dateEnd, setDateEnd] = useState(new Date()) const [customerType, setCustomerType] = useState() const handleChange = (event: ChangeEvent) => { setCustomerType((event.target as HTMLInputElement).value) } return ( 集計
} onChange={(dateStart: Date) => setDateStart(dateStart)} /> } onChange={(dateEnd: Date) => setDateEnd(dateEnd)} /> 顧客種別 } label='全ての顧客' /> } label='行政系顧客' /> } label='事業系顧客' />
); }; Schedule.acl = { action: "manage", subject: "admin", }; export default Schedule;