From 90efb5be001393134aaef07fe11e9ad605692043 Mon Sep 17 00:00:00 2001 From: Mo Tarbin Date: Sat, 20 Jul 2024 03:40:41 -0400 Subject: Support for history Modification and deletion --- src/views/History/HistoryCard.jsx | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'src/views/History/HistoryCard.jsx') diff --git a/src/views/History/HistoryCard.jsx b/src/views/History/HistoryCard.jsx index 5e71f52..34a0b33 100644 --- a/src/views/History/HistoryCard.jsx +++ b/src/views/History/HistoryCard.jsx @@ -11,7 +11,13 @@ import { } from '@mui/joy' import moment from 'moment' -const HistoryCard = ({ allHistory, performers, historyEntry, index }) => { +const HistoryCard = ({ + allHistory, + performers, + historyEntry, + index, + onClick, +}) => { function formatTimeDifference(startDate, endDate) { const diffInMinutes = moment(startDate).diff(endDate, 'minutes') let timeValue = diffInMinutes @@ -64,7 +70,7 @@ const HistoryCard = ({ allHistory, performers, historyEntry, index }) => { icon = } else { text = 'No Due Date' - color = 'info' + color = 'neutral' icon = } @@ -77,7 +83,7 @@ const HistoryCard = ({ allHistory, performers, historyEntry, index }) => { return ( <> - + {' '} {/* Adjusted spacing and alignment */} @@ -98,7 +104,11 @@ const HistoryCard = ({ allHistory, performers, historyEntry, index }) => { }} > - {moment(historyEntry.completedAt).format('ddd MM/DD/yyyy HH:mm')} + {historyEntry.completedAt + ? moment(historyEntry.completedAt).format( + 'ddd MM/DD/yyyy HH:mm', + ) + : 'Skipped'} {getCompletedChip(historyEntry)} -- cgit