From ba3331efe8f51cb1a0029e20bbfd7060312b810e Mon Sep 17 00:00:00 2001 From: Mo Tarbin Date: Sat, 13 Jul 2024 01:54:23 -0400 Subject: Add Footer component to Landing page --- src/views/ChoreEdit/ChoreView.jsx | 106 ++++++++++++++++++++++++++++---------- 1 file changed, 80 insertions(+), 26 deletions(-) (limited to 'src/views/ChoreEdit') diff --git a/src/views/ChoreEdit/ChoreView.jsx b/src/views/ChoreEdit/ChoreView.jsx index df45aa7..9e3357b 100644 --- a/src/views/ChoreEdit/ChoreView.jsx +++ b/src/views/ChoreEdit/ChoreView.jsx @@ -3,15 +3,19 @@ import { CancelScheduleSend, Check, Checklist, + Edit, + History, Note, PeopleAlt, Person, + Timelapse, } from '@mui/icons-material' import { Box, Button, Card, Checkbox, + Chip, Container, FormControl, Grid, @@ -84,21 +88,24 @@ const ChoreView = () => { const generateInfoCards = chore => { const cards = [ + // { + // size: 6, + // icon: , + // text: 'Due Date', + // subtext: moment(chore.nextDueDate).format('MM/DD/YYYY hh:mm A'), + // }, { - icon: , - text: 'Due Date', - subtext: moment(chore.nextDueDate).format('MM/DD/YYYY hh:mm A'), - }, - { + size: 6, icon: , text: 'Assigned To', subtext: performers.find(p => p.id === chore.assignedTo)?.displayName, }, - { - icon: , - text: 'Created By', - subtext: performers.find(p => p.id === chore.createdBy)?.displayName, - }, + // { + // size: 6, + // icon: , + // text: 'Created By', + // subtext: performers.find(p => p.id === chore.createdBy)?.displayName, + // }, // { // icon: , // text: 'Frequency', @@ -107,20 +114,23 @@ const ChoreView = () => { // chore.frequencyType.slice(1), // }, { + size: 6, icon: , - text: 'Total Completed', - subtext: `${chore.totalCompletedCount}`, + text: 'Completed', + subtext: `${chore.totalCompletedCount} times`, }, - // { - // icon: , - // text: 'Last Completed', - // subtext: - // chore.lastCompletedDate && - // moment(chore.lastCompletedDate).format('MM/DD/YYYY hh:mm A'), - // }, { + size: 6, + icon: , + text: 'Last time', + subtext: + chore.lastCompletedDate && + moment(chore.lastCompletedDate).format('MM/DD/YYYY hh:mm A'), + }, + { + size: 6, icon: , - text: 'Last Completed', + text: 'Last', subtext: chore.lastCompletedDate ? `${ chore.lastCompletedDate && @@ -132,6 +142,7 @@ const ChoreView = () => { : 'Never', }, { + size: 12, icon: , text: 'Recent Note', subtext: chore.notes || '--', @@ -195,22 +206,43 @@ const ChoreView = () => { justifyContent: 'space-between', }} > - + {chore.name} - + } size='lg' sx={{ mb: 4 }}> + {chore.nextDueDate + ? `Due at ${moment(chore.nextDueDate).format('MM/DD/YYYY hh:mm A')}` + : 'N/A'} + + + {infoCards.map((info, index) => ( - - + + {info.icon} @@ -227,6 +259,28 @@ const ChoreView = () => { ))} + + + + + + {/*