Professional Documents
Culture Documents
useEffect(() => {
handleNavigate(new Date());
}, [toggle]);
const handleNavigate = date => {
setYourdate(date);
};
const RightContainer = props => {
return (
<>
<WhiteButton
variant="contained"
color="primary"
onClick={() => {
handlePopUpClick();
}}
style={{
boxShadow: 'none',
border: '1px solid #00000029',
marginRight: 20,
fontSize: '0.9rem',
}}
>
Cancelled / Deferred
</WhiteButton>
<SearchInput
style={{ width: 250 }}
// onChange={e => handleChange(e.target.value)}
placeholder="Search by Name"
/>
<Tabs
value={actionIndex}
onChange={handleActionIndex}
// variant="scrollable"
// scrollButtons="on"
aria-label="full width tabs example"
TabIndicatorProps={{
style: {
// background: '#FF3399',
height: 0,
},
}}
style={{ marginLeft: 20, alignItems: 'center' }}
>
<WithoutIndicatorTab {...a11yProps(0)} label="Progress" />
<WithoutIndicatorTab {...a11yProps(1)} label="Timeline" />
</Tabs>
</>
);
};
const BottomContainer = () => {
return <>{toggle ? <Timeline yourdate={yourdate} /> : <ProgressPage />}</>;
};
const [openCreateDayCare, setOpenCreateDayCare] = useState(false);
const handleCreateDaycarePopup = value => {
setOpenCreateDayCare(!openCreateDayCare);
};
const addObjInDayCare = field => {};
return (
<>
<Box display="flex">
<Box flex="1 1 auto">
<OuterBoxPaper
title={"Today's Daycare Schedule"}
hideCloseIcon={true}
rightContainer={RightContainer()}
bottomComponent={BottomContainer()}
bottomHeight={'78vh'}
bottomCss={classes.bottomCss}
/>
</Box>
{openCreateDayCare && (
<Box
style={{
width: 400,
flex: '0 0 auto',
}}
>
<CreateDayCare
popperOPen={handleCreateDaycarePopup}
addObjInDayCare={addObjInDayCare}
/>
</Box>
)}
</Box>
{!openCreateDayCare && (
<PinkAddCircleButton
onClick={handleCreateDaycarePopup}
title={'Book DayCare'}
size="small"
style={{
width: 140,
borderRadius: 50,
position: 'fixed',
bottom: 40,
right: 40,
}}
/>
)}
<PopUp
open={openPopUp}
handleClick={handlePopUpClick}
render={
<>
<CancelDayCareAppointments
handleClose={() => {
handlePopUpClick();
}}
/>
{/* // <BroadcastingDetails
// Data={data[editIndex]}
// handleClose={() => {
// handlePopUpClick();
// }}
// /> */}
</>
}
/>
</>
);
};
export default DayCare;