customers
This commit is contained in:
@@ -19,18 +19,16 @@ export default function DateFilterDialog({ open, onClose, onApply }) {
|
||||
|
||||
const handleSelect = (range) => {
|
||||
if (!range?.startDate || !range?.endDate) return;
|
||||
|
||||
onApply({
|
||||
startDate: dayjs(range.startDate).format('YYYY-MM-DD'),
|
||||
endDate: dayjs(range.endDate).format('YYYY-MM-DD'),
|
||||
label: range.label || ''
|
||||
});
|
||||
|
||||
onClose();
|
||||
};
|
||||
|
||||
return (
|
||||
<Dialog open={open} onClose={onClose} fullWidth maxWidth="sm">
|
||||
<Dialog open={open} onClose={() => onclose()} fullWidth maxWidth="sm">
|
||||
<DialogTitle disableTypography>
|
||||
<Stack display="flex" flexDirection="row" justifyContent="space-between" alignItems="center" sx={{ width: '100%' }}>
|
||||
<Typography variant="h4">Select Date Range</Typography>
|
||||
|
||||
9
src/components/nearle_components/OpenToast.js
Normal file
9
src/components/nearle_components/OpenToast.js
Normal file
@@ -0,0 +1,9 @@
|
||||
import { enqueueSnackbar } from 'notistack';
|
||||
|
||||
export const OpenToast = (message, variant = 'default', time = 2000) => {
|
||||
enqueueSnackbar(message, {
|
||||
variant,
|
||||
anchorOrigin: { vertical: 'top', horizontal: 'right' },
|
||||
autoHideDuration: time
|
||||
});
|
||||
};
|
||||
@@ -41,7 +41,7 @@ const SearchBar = ({ value, onChange, sx, placeholder = 'Search (Ctrl + K)' }) =
|
||||
autoComplete="off"
|
||||
size="large"
|
||||
startAdornment={
|
||||
<InputAdornment position="start" sx={{ mr: -0.5, color: theme.palette.primary.main }}>
|
||||
<InputAdornment position="start" sx={{ mr: -0.5, color: theme.palette.secondary.main }}>
|
||||
<SearchOutlined />
|
||||
</InputAdornment>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user