diff options
author | Mo Tarbin <mhed.t91@gmail.com> | 2024-09-06 01:22:55 -0400 |
---|---|---|
committer | Mo Tarbin <mhed.t91@gmail.com> | 2024-09-06 01:22:55 -0400 |
commit | 2d2cf6d378d92aac31b3b09506bc6310466a0b07 (patch) | |
tree | a06c0135171256e9f28512dc840976615e802675 /src/views/ChoreEdit | |
parent | c35801d00fef528a87d226ed9e48cd3ba7856c50 (diff) | |
parent | 240633177cc646e6662f27e1334b5e83d962170d (diff) | |
download | donetick-frontend-2d2cf6d378d92aac31b3b09506bc6310466a0b07.tar.gz donetick-frontend-2d2cf6d378d92aac31b3b09506bc6310466a0b07.tar.bz2 donetick-frontend-2d2cf6d378d92aac31b3b09506bc6310466a0b07.zip |
- Add Cookie Permission component
- Add Filter button instead of chips in mychores view
- show except days instead of showing evenything when days.length>4
Diffstat (limited to 'src/views/ChoreEdit')
-rw-r--r-- | src/views/ChoreEdit/ChoreView.jsx | 62 |
1 files changed, 48 insertions, 14 deletions
diff --git a/src/views/ChoreEdit/ChoreView.jsx b/src/views/ChoreEdit/ChoreView.jsx index 172ad9b..b77b511 100644 --- a/src/views/ChoreEdit/ChoreView.jsx +++ b/src/views/ChoreEdit/ChoreView.jsx @@ -3,6 +3,7 @@ import { CancelScheduleSend, Check, Checklist, + Edit, History, PeopleAlt, Person, @@ -258,7 +259,7 @@ const ChoreView = () => { > <Grid container spacing={1}> {infoCards.map((detail, index) => ( - <Grid item xs={4} key={index}> + <Grid item xs={6} key={index}> {/* divider between the list items: */} <ListItem key={index}> @@ -411,7 +412,15 @@ const ChoreView = () => { }} /> )} - + <Box + sx={{ + display: 'flex', + flexDirection: 'row', + gap: 1, + alignContent: 'center', + justifyContent: 'center', + }} + > <Button fullWidth size='lg' @@ -419,20 +428,15 @@ const ChoreView = () => { disabled={isPendingCompletion} color={isPendingCompletion ? 'danger' : 'success'} startDecorator={<Check />} + sx={ + { + flex: 4, + } + } > <Box>Mark as done</Box> </Button> - <Divider sx={{ my: 0.5 }}>or</Divider> - - <Box - sx={{ - display: 'flex', - flexDirection: 'row', - gap: 1, - alignContent: 'center', - justifyContent: 'center', - }} - > + <Button fullWidth size='lg' @@ -454,9 +458,26 @@ const ChoreView = () => { }) }} startDecorator={<SwitchAccessShortcut />} + sx={ + { + flex: 1, + } + } > <Box>Skip</Box> </Button> + </Box> + <Divider sx={{ my: 0.5 }}>More</Divider> + + <Box + sx={{ + display: 'flex', + flexDirection: 'row', + gap: 1, + alignContent: 'center', + justifyContent: 'center', + }} + > <Button startDecorator={<History />} size='lg' @@ -469,8 +490,21 @@ const ChoreView = () => { > History </Button> - </Box> + <Button + startDecorator={<Edit />} + size='lg' + color='primary' + variant='outlined' + fullWidth + onClick={() => { + navigate(`/chores/${choreId}/edit`) + }} + > + Edit + </Button> + +</Box> <Snackbar open={isPendingCompletion} endDecorator={ |