From 7f4e5928492a71135f6817874461c80a0ecc155c Mon Sep 17 00:00:00 2001 From: Mo Tarbin Date: Tue, 16 Jul 2024 19:37:18 -0400 Subject: Add SkipChore function to Fetcher utility module, Update Loading Comp --- src/views/ChoreEdit/ChoreView.jsx | 193 ++++++++++++++++++++++++-------------- 1 file changed, 125 insertions(+), 68 deletions(-) (limited to 'src/views/ChoreEdit') diff --git a/src/views/ChoreEdit/ChoreView.jsx b/src/views/ChoreEdit/ChoreView.jsx index afdc379..172ad9b 100644 --- a/src/views/ChoreEdit/ChoreView.jsx +++ b/src/views/ChoreEdit/ChoreView.jsx @@ -26,6 +26,7 @@ import { styled, Typography, } from '@mui/joy' +import { Divider } from '@mui/material' import moment from 'moment' import { useEffect, useState } from 'react' import { useNavigate, useParams, useSearchParams } from 'react-router-dom' @@ -135,7 +136,7 @@ const ChoreView = () => { ? `${ performers.find(p => p.id === chore.lastCompletedBy)?.displayName }` - : 'Never', + : '--', }, { size: 6, @@ -230,8 +231,8 @@ const ChoreView = () => { level='h3' // textAlign={'center'} sx={{ - mt: 2, - mb: 1, + mt: 1, + mb: 0.5, }} > {chore.name} @@ -243,7 +244,7 @@ const ChoreView = () => { - + Details @@ -265,9 +266,13 @@ const ChoreView = () => { {detail.text} - + {detail.subtext ? detail.subtext : '--'} - + @@ -286,28 +291,6 @@ const ChoreView = () => { )} - - - - {/* { mt: 2, }} > - Additional Notes - { - if (e.target.value.trim() === '') { - setNote(null) - return + + Complete the task + + + + { + if (e.target.checked) { + setNote('') + } else { + setNote(null) + } + }} + overlay + sx={ + { + // my: 1, + } } - setNote(e.target.value) - }} - size='md' - sx={{ - mb: 1, - }} - /> + label={ + + Add Additional Notes + + } + /> + + {note !== null && ( + { + if (e.target.value.trim() === '') { + setNote(null) + return + } + setNote(e.target.value) + }} + size='md' + sx={{ + mb: 1, + }} + /> + )} { // my: 1, } } - label={Set completion date} + label={ + + Specify completion date + + } /> {completedDate !== null && ( @@ -390,30 +422,55 @@ const ChoreView = () => { > Mark as done - + + + +