-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAllTask.jsx
More file actions
32 lines (28 loc) · 1.46 KB
/
AllTask.jsx
File metadata and controls
32 lines (28 loc) · 1.46 KB
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
import React, { useContext } from 'react'
import { AuthContext } from '../../context/AuthProvider'
const AllTask = () => {
const [userData,setUserData]= useContext(AuthContext)
return (
<div className='bg-[#1c1c1c] p-5 rounded mt-8'>
<div className='bg-red-900 mb-2 py-2 px-4 flex justify-between rounded'>
<h2 className='text-lg font-medium w-1/5'>Employee Name</h2>
<h3 className='text-lg font-medium w-1/5'>New Task</h3>
<h5 className='text-lg font-medium w-1/5'>Active Task</h5>
<h5 className='text-lg font-medium w-1/5'>Completed</h5>
<h5 className='text-lg font-medium w-1/5'>Failed</h5>
</div>
<div className=''>
{userData.map((elem,idx)=>{
return <div key={idx} className='border-2 border-emerald-400 mb-2 py-2 px-4 flex justify-between rounded' >
<h2 className='text-lg font-medium w-1/5'>{elem.firstname}</h2>
<h3 className='text-lg font-medium w-1/5 text-blue-400'>{elem.taskCounts.new_task}</h3>
<h5 className='text-lg font-medium w-1/5 text-yellow-400'>{elem.taskCounts.active}</h5>
<h5 className='text-lg font-medium w-1/5 text-green-400'>{elem.taskCounts.completed}</h5>
<h5 className='text-lg font-medium w-1/5 text-red-400'>{elem.taskCounts.failed}</h5>
</div>
})}
</div>
</div>
)
}
export default AllTask