1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
import { Box, Card, Grid, List, Typography } from '@mui/joy'
import moment from 'moment'
import HistoryCard from '../History/HistoryCard'
const DemoHistory = () => {
const allHistory = [
{
id: 32,
choreId: 12,
completedAt: moment().hour(4).format(),
completedBy: 1,
assignedTo: 1,
notes: null,
dueDate: moment().format(),
},
{
id: 31,
choreId: 12,
completedAt: moment().day(-1).format(),
completedBy: 1,
assignedTo: 1,
notes: 'Need to be replaced with a new one',
dueDate: moment().day(-2).format(),
},
{
id: 31,
choreId: 12,
completedAt: moment().day(-10).hour(1).format(),
completedBy: 2,
assignedTo: 1,
notes: null,
dueDate: moment().day(-10).format(),
},
]
const performers = [
{
userId: 1,
displayName: 'Ryan',
},
{
userId: 2,
displayName: 'Sarah',
},
]
return (
<>
<Grid item xs={12} sm={6} data-aos-history-list>
<Box sx={{ borderRadius: 'sm', p: 2, boxShadow: 'md' }}>
<List sx={{ p: 0 }}>
{allHistory.map((historyEntry, index) => (
<div
data-aos-delay={100 * index + 200}
data-aos-anchor='[data-aos-history-list]'
data-aos='fade-right'
key={index}
>
<HistoryCard
allHistory={allHistory}
historyEntry={historyEntry}
key={index}
index={index}
performers={performers}
/>
</div>
))}
</List>
</Box>
</Grid>
<Grid item xs={12} sm={6} data-aos-history-demo-section>
<Card
sx={{
p: 4,
py: 6,
}}
data-aos-delay={200}
data-aos-anchor='[data-aos-history-demo-section]'
data-aos='fade-left'
>
<Typography level='h3' textAlign='center' sx={{ mt: 2, mb: 4 }}>
History with a purpose
</Typography>
<Typography level='body-lg' textAlign='center' sx={{ mb: 4 }}>
Keep track of all your chores and tasks with ease. Donetick records
due dates, completion dates, and who completed each task. Any notes
added to tasks are also tracked, providing a complete history for
your reference. Stay organized and informed with detailed task
tracking.
</Typography>
</Card>
</Grid>
</>
)
}
export default DemoHistory
|