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