Skip to content

Commit ae1f523

Browse files
committed
updating-trainee-dashboard
1 parent 31852e3 commit ae1f523

12 files changed

+604
-219
lines changed

package-lock.json

Lines changed: 197 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
"homepage": "https://github.com/atlp-rwanda/atlp-pulse-fn#readme",
3333
"dependencies": {
3434
"@babel/preset-react": "^7.22.5",
35-
"@emotion/react": "^11.11.1",
36-
"@emotion/styled": "^11.11.0",
35+
"@emotion/react": "^11.13.3",
36+
"@emotion/styled": "^11.13.0",
3737
"@fullcalendar/core": "^6.1.15",
3838
"@fullcalendar/daygrid": "^6.1.15",
3939
"@fullcalendar/interaction": "^6.1.15",
@@ -44,8 +44,10 @@
4444
"@heroicons/react": "^1.0.6",
4545
"@iconify/react": "^3.2.2",
4646
"@mui/icons-material": "^5.14.0",
47-
"@mui/material": "^5.14.0",
47+
"@mui/material": "^5.16.7",
4848
"@mui/styled-engine": "^5.13.2",
49+
"@mui/styled-engine-sc": "^6.1.3",
50+
"@mui/x-charts": "^7.19.0",
4951
"@mui/x-data-grid": "^5.17.26",
5052
"@react-pdf-viewer/core": "^3.12.0",
5153
"@tanstack/react-table": "^8.20.5",
@@ -110,6 +112,7 @@
110112
"recharts": "^2.7.2",
111113
"sheetjs-style": "^0.15.8",
112114
"sinon": "^14.0.2",
115+
"styled-components": "^6.1.13",
113116
"subscriptions-transport-ws": "^0.11.0",
114117
"tailwindcss": "^3.3.3",
115118
"url-polyfill": "^1.1.12",

src/components/DataTable.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,14 @@ function DataTable({ data, columns, title, loading, className }: TableData) {
7575
<h2 className="text-lg md:text-xl font-semibold text-gray-800 dark:text-white">
7676
{t(title)}
7777
</h2>
78-
<input
78+
{/* Uncomment if you want a filter input */}
79+
{/* <input
7980
value={filterInput}
8081
aria-label="Filter table data"
8182
placeholder="Filter"
8283
className="px-4 py-2 mt-4 font-sans text-xs md:text-sm border rounded outline-none border-primary dark:bg-neutral-600 dark:text-white w-full sm:w-52 md:w-96"
8384
onChange={handleFilterChange}
84-
/>
85+
/> */}
8586
</div>
8687
</div>
8788
<div className="overflow-x-auto">
@@ -113,8 +114,8 @@ function DataTable({ data, columns, title, loading, className }: TableData) {
113114
<tr
114115
className={`border-b dark:border-gray-700 ${
115116
row.index % 2 === 0
116-
? 'bg-light-bg dark:bg-neutral-600'
117-
: 'bg-white dark:bg-dark-bg'
117+
? 'bg-gray-600 dark:bg-neutral-600'
118+
: 'bg-transparent'
118119
}`}
119120
{...row.getRowProps()}
120121
key={row.id}
@@ -167,7 +168,7 @@ function DataTable({ data, columns, title, loading, className }: TableData) {
167168
pageCount={pageCount}
168169
pageIndex={pageIndex}
169170
/>
170-
</div>
171+
</div>
171172
</div>
172173
);
173174
}

src/components/TraineeDashboardChart.tsx

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,36 +37,39 @@ const TraineeChart: React.FC<TraineeChartProps> = ({ barChartData }) => {
3737

3838
return (
3939
<div className="Trainee-chart font-serif">
40-
<LineChart width={1000} height={220} data={chartData}>
40+
<LineChart width={1000} height={230} data={chartData}>
4141
<CartesianGrid stroke="#ccc" />
4242
<XAxis
4343
dataKey="name"
44-
label={{ value: 'Sprint', position: 'insideBottom', offset: -2 }}
44+
label={{ value: 'Sprints', position: 'insideBottom', offset: -2 }}
45+
interval={0}
46+
tickFormatter={(value) => `${value}`}
4547
/>
4648
<YAxis label={{ value: 'Score', angle: -90, position: 'insideLeft' }} />
4749
<Tooltip />
48-
<Legend iconType="circle" iconSize={10} />
49-
50+
<div className='mt-3'></div>
51+
<Legend iconType="circle" iconSize={10} />
52+
5053
<Line
5154
type="monotone"
5255
dataKey="Professionalism"
5356
stroke="#1b5e20"
5457
strokeWidth={2}
55-
dot={false}
58+
dot={true}
5659
/>
5760
<Line
5861
type="monotone"
5962
dataKey="Quality"
6063
stroke="#8667f2"
6164
strokeWidth={2}
62-
dot={false}
65+
dot={true}
6366
/>
6467
<Line
6568
type="monotone"
6669
dataKey="Quantity"
6770
stroke="#b5a72a"
6871
strokeWidth={2}
69-
dot={false}
72+
dot={true}
7073
/>
7174
</LineChart>
7275
</div>

0 commit comments

Comments
 (0)