Skip to content

Commit a0f496a

Browse files
authored
updating-trainee-dashboard (#528)
1 parent 0b14790 commit a0f496a

15 files changed

+742
-327
lines changed

Diff for: package-lock.json

+197-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: package.json

+6-3
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.13.3",
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",

Diff for: src/components/DashHeader.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ function DashHeader({minimize}: any) {
172172
</div>
173173
<div className="flex items-center h-full lg:w-full">
174174
<Link
175-
to="/super-admin"
175+
to="/"
176176
className="flex flex-row lg:px-5 text-dark dark:text-dark-text-fill"
177177
>
178178
<LogoIcon />

Diff for: src/components/DataTable.tsx

+11-8
Original file line numberDiff line numberDiff line change
@@ -68,23 +68,24 @@ function DataTable({ data, columns, title, loading, className }: TableData) {
6868

6969
return (
7070
<div
71-
className={`relative font-serif bg-indigo-100 dark:bg-dark-bg shadow-lg h-fit px-5 py-8 rounded-md w-[100%] overflow-scroll "lg:ml-60 mx-auto"} mb-10 ${className}`}
71+
className={`relative font-serif bg-indigo-100 dark:bg-dark-bg shadow-lg h-fit px-5 md:py-4 lg:py-5 rounded-md w-[100%] overflow-auto custom-scrollbar "lg:ml-60 mx-auto"} lg:mb-10 ${className}`}
7272
>
7373
<div className="flex flex-col md:flex-row items-center justify-between pb-6 space-y-4 md:space-y-0">
7474
<div>
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>
87-
<div className="overflow-x-auto">
88+
<div className="overflow-x-auto custom-scrollbar">
8889
<table
8990
className="min-w-full leading-normal text-xs md:text-sm"
9091
{...getTableProps()}
@@ -94,7 +95,9 @@ function DataTable({ data, columns, title, loading, className }: TableData) {
9495
<tr {...headerGroup.getHeaderGroupProps()} key={headerGroup.id}>
9596
{headerGroup.headers.map((column) => (
9697
<th
97-
className={`thead ${column.isSorted ? 'sort-asc' : ''}`}
98+
className={`thead w-1/${columns.length} text-center ${
99+
column.isSorted ? 'sort-asc' : ''
100+
}`}
98101
{...column.getHeaderProps(column.getSortByToggleProps())}
99102
key={column.id}
100103
>
@@ -113,15 +116,15 @@ function DataTable({ data, columns, title, loading, className }: TableData) {
113116
<tr
114117
className={`border-b dark:border-gray-700 ${
115118
row.index % 2 === 0
116-
? 'bg-light-bg dark:bg-neutral-600'
117-
: 'bg-white dark:bg-dark-bg'
119+
? 'bg-gray-600 dark:bg-neutral-600'
120+
: 'bg-transparent'
118121
}`}
119122
{...row.getRowProps()}
120123
key={row.id}
121124
>
122125
{row.cells.map((cell) => (
123126
<td
124-
className="data-cell px-4 py-2"
127+
className={`w-1/${columns.length} data-cell px-4 py-2 text-center`}
125128
{...cell.getCellProps()}
126129
key={cell.column.id}
127130
>

0 commit comments

Comments
 (0)