working on gasht detail part
This commit is contained in:
@@ -1,8 +1,9 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import {Box, Slide} from "@mui/material";
|
import {Box, Button, Chip, Divider, Slide} from "@mui/material";
|
||||||
import {useState} from "react";
|
import {useState} from "react";
|
||||||
import CarCode from "@/core/components/CarCode";
|
import CarCode from "@/core/components/CarCode";
|
||||||
|
import SearchIcon from '@mui/icons-material/Search';
|
||||||
|
|
||||||
const PatrolDetail = ({tabState, setTabState}) => {
|
const PatrolDetail = ({tabState, setTabState}) => {
|
||||||
const [patrolFounded, setPatrolFounded] = useState(false);
|
const [patrolFounded, setPatrolFounded] = useState(false);
|
||||||
@@ -18,9 +19,14 @@ const PatrolDetail = ({tabState, setTabState}) => {
|
|||||||
my: 3
|
my: 3
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Box>
|
<Box sx={{display: "flex", gap: 2}}>
|
||||||
<CarCode carCode={carCode} setCarCode={setCarCode}/>
|
<CarCode carCode={carCode} setCarCode={setCarCode}/>
|
||||||
|
|
||||||
|
<Button variant="contained" color="success" endIcon={<SearchIcon/>}>درخواست اطلاعات</Button>
|
||||||
</Box>
|
</Box>
|
||||||
|
<Divider sx={{my: 2, width: "100%"}}>
|
||||||
|
<Chip color="primary" label="مشخصات گشت"/>
|
||||||
|
</Divider>
|
||||||
<Slide in={patrolFounded} sx={{my: 5, width: {xs: "100%", sm: "70%"}}}>
|
<Slide in={patrolFounded} sx={{my: 5, width: {xs: "100%", sm: "70%"}}}>
|
||||||
<Box>
|
<Box>
|
||||||
</Box>
|
</Box>
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
import { LocalizationProvider, MobileDateTimePicker } from "@mui/x-date-pickers";
|
import {LocalizationProvider, MobileDateTimePicker} from "@mui/x-date-pickers";
|
||||||
import { AdapterDateFnsJalali } from "@mui/x-date-pickers/AdapterDateFnsJalali";
|
import {AdapterDateFnsJalali} from "@mui/x-date-pickers/AdapterDateFnsJalali";
|
||||||
import moment from "jalali-moment";
|
import moment from "jalali-moment";
|
||||||
import { faIR } from "@mui/x-date-pickers/locales";
|
import {faIR} from "@mui/x-date-pickers/locales";
|
||||||
import { Box, IconButton, FormControl, FormHelperText, InputAdornment, Stack } from "@mui/material";
|
import {FormControl, IconButton, InputAdornment, Stack} from "@mui/material";
|
||||||
import ClearIcon from "@mui/icons-material/Clear";
|
import ClearIcon from "@mui/icons-material/Clear";
|
||||||
|
|
||||||
export default function PickerWithButtonField({ formik, name, value, error, touched, disabled }) {
|
export default function PickerWithButtonField({formik, name, value, error, touched, disabled}) {
|
||||||
return (
|
return (
|
||||||
<FormControl variant="outlined" fullWidth size="small" error={!!error}>
|
<FormControl variant="outlined" fullWidth size="small" error={!!error}>
|
||||||
<Stack sx={{ width: "100%" }} direction={"row"}>
|
<Stack sx={{width: "100%"}} direction={"row"}>
|
||||||
<LocalizationProvider
|
<LocalizationProvider
|
||||||
dateAdapter={AdapterDateFnsJalali}
|
dateAdapter={AdapterDateFnsJalali}
|
||||||
localeText={faIR.components.MuiLocalizationProvider.defaultProps.localeText}
|
localeText={faIR.components.MuiLocalizationProvider.defaultProps.localeText}
|
||||||
@@ -30,15 +30,15 @@ export default function PickerWithButtonField({ formik, name, value, error, touc
|
|||||||
fullWidth: true,
|
fullWidth: true,
|
||||||
error: !!error,
|
error: !!error,
|
||||||
helperText: touched && error,
|
helperText: touched && error,
|
||||||
size: "small", // Ensure that the TextField is small
|
size: "small",
|
||||||
InputProps: {
|
InputProps: {
|
||||||
endAdornment: (
|
endAdornment: (
|
||||||
<InputAdornment position="end">
|
<InputAdornment position="end">
|
||||||
<IconButton
|
<IconButton
|
||||||
size="small" // Set size="small" for IconButton
|
size="small"
|
||||||
onClick={() => formik.setFieldValue(name, null)}
|
onClick={() => formik.setFieldValue(name, null)}
|
||||||
>
|
>
|
||||||
<ClearIcon />
|
<ClearIcon/>
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</InputAdornment>
|
</InputAdornment>
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user