Skip to content

Commit f3d9c53

Browse files
GSinseswa721Bananayosostene
authored andcommitted
admin dashoard functinality
error: Your local changes to the following files would be overwritten by checkout: tests/pages/TraineeAttendance.test.tsx Please commit your changes or stash them before you switch branches. edit 7d95521 sort invitations by descending or ascending (#590) s fix-docs (#587) s b1a22b6 fix Internanationalization testimonial section (#592) s df093d2 changing undrop icon (#583) s b7cb194 fx<search> improving search invitation to listern to typing event (#591) s 9e05149 fix(#404):login activies display in a table (#576) s 464657e fix(#403):adding a not found page (#593) s cc142ef fix(#599): Improve invitation table pagination (#553) s f08afd4 fix(#595):Improve the dark mode skeleton to match dark design (#598) s 4321d94 fix(#404): add skeleton loader on login activities table (#600) s d72b882 Remove ratings legacy feature #225 (#594) s 6ea7721 fix(#391):Enable Consistent Edit For All Cohorts (#607) s fe125aa fix(#605):table responsiveness (#611) s acbeb7e (#606) Harmonize action button theme across tables in TTL's portal (#613) s 643274e fix(#394): Resolve Trainee Detail View Errors (#614) s 75d247a average ratings (#617) s 4c9fc7c TTL-Page improvement (#601) s 2e47213 #513 refactoring attendance feature on trainee side (#603) s 58eb885 fix: move client-side attendance logic to server (#596) s a14728e Enable admin to view all programs with user breakdown per program-#422 (#618) s 31852e3 (fix): add coordinator dashboard page (#608)S C:\Users\B Sostene\Desktop\atlp-pulse-fn> git checkout develop error: Your local changes to the following files would be overwritten by checkout: tests/pages/TraineeAttendance.test.tsx Please commit your changes or stash them before you switch branches. s 7d95521 sort invitations by descending or ascending (#590) s 711747f fix-docs (#587) s b2a22b6 fix Internanationalization testimonial section (#592) s df093d2 changing undrop icon (#583) s b7cb194 fx<search> improving search invitation to listern to typing event (#591) s 9e05149 fix(#404):login activies display in a table (#576) s 464657e fix(#403):adding a not found page (#593) s cc142ef fix(#599): Improve invitation table pagination (#553) s f08afd4 fix(#595):Improve the dark mode skeleton to match dark design (#598) s 4321d94 fix(#404): add skeleton loader on login activities table (#600) s d72b882 Remove ratings legacy feature #225 (#594) s 6ea7721 fix(#391):Enable Consistent Edit For All Cohorts (#607) s fe125aa fix(#605):table responsiveness (#611) s acbeb7e (#606) Harmonize action button theme across tables in TTL's portal (#613) s 643274e fix(#394): Resolve Trainee Detail View Errors (#614) s 75d247a average ratings (#617) s 4c9fc7c TTL-Page improvement (#601) s 2e47213 #513 refactoring attendance feature on trainee side (#603) s 58eb885 fix: move client-side attendance logic to server (#596) s a14728e Enable admin to view all programs with user breakdown per program-#422 (#618) s 31852e3 (fix): add coordinator dashboard page (#608)ort invitations by descending or ascending (#590) Co-authored-by: niyobertin <[email protected]> fix-docs (#587) fix Internanationalization testimonial section (#592) changing undrop icon (#583) fx<search> improving search invitation to listern to typing event (#591) fix(#404):login activies display in a table (#576) fix(#403):adding a not found page (#593) fix(#599): Improve invitation table pagination (#553) fix(#595):Improve the dark mode skeleton to match dark design (#598) fix(#404): add skeleton loader on login activities table (#600) Remove ratings legacy feature #225 (#594) fix(#391):Enable Consistent Edit For All Cohorts (#607) -As an admin, I have ability to edit all cohorts that I am permitted to manage fix(#605):table responsiveness (#611) Co-authored-by: niyobertin <[email protected]> (#606) Harmonize action button theme across tables in TTL's portal (#613) fix(#394): Resolve Trainee Detail View Errors (#614) average ratings (#617) TTL-Page improvement (#601) * droping and undropping ttl * ft-droping-and-undropping-ttl * ft-droping-and-undropping-ttl * ft-ttl-page-improvement * fix: move client-side attendance logic to server * feat(trainee-attendance): implements a trainee-side attendance fix: move client-side attendance logic to server (#596) Enable admin to view all programs with user breakdown per program-#422 (#618) (fix): add coordinator dashboard page (#608) main admin dashboard new piechart and stats updated new piechart and stats updated ft-admin-dashboard-can-vieww-table-teams new piechart and stats updated
1 parent 7d28c4f commit f3d9c53

15 files changed

+908
-24
lines changed

Diff for: public/locales/fr/translation.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,7 @@
464464
"Sprint Ratings": "Sprint Notations",
465465
"Please wait to be added to a program or cohort": "Veuillez attendre d'être ajouté à un programme ou à une cohorte",
466466
"Select all the required information": "Entrez toutes les informations requises",
467+
"Enter all the required information": "Entrez toutes les informations requises",
467468
"Are you sure you want to delete this user?": "Êtes-vous sûr de vouloir supprimer cet utilisateur ?",
468469
"Come shape the future together": "Venez former l'avenir ensemble",
469470
"Content1": "Je suis extrêmement impressionné par Pulse et leur plateforme de gestion de la performance. Depuis que nous utilisons leurs services, cela a été un véritable changement pour notre organisation. La plateforme est intuitive, facile à naviguer et riche en fonctionnalités puissantes",
@@ -473,4 +474,4 @@
473474
"Director": "Directeur",
474475
"Andela": "Andela",
475476
"University of Rwanda": "Université du Rwanda"
476-
}
477+
}

Diff for: public/locales/kn/translation.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,7 @@
453453
"Sprint Ratings": "Amanota ya Sprint",
454454
"Please wait to be added to a program or cohort": "Tegereza tukongere muri porogarame cyangwa itsinda",
455455
"Select all the required information": "Shyiramo amakuru yose asabwa",
456+
"Enter all the required information": "Shyiramo amakuru yose asabwa",
456457
"Are you sure you want to delete this user?": "urashaka kwemeza ikigikorwa cyo gusiba uyumuntu ?",
457458
"Come shape the future together": "Dufatanye kwubaka ejo Hazaza",
458459
"Content1": "Nshimishijwe cyane na Pulse n'ikoranabuhanga ryabo ryo gucunga imikorere. Kuva natangira gukoresha serivisi zabo, byabaye impinduka ikomeye mu kigo cyacu. iri koranabuhanga riroroshye kurikoresha, kandi ryubakanye ubuhanga n' ubushobozi buhanitse.",
@@ -462,4 +463,4 @@
462463
"Director": "Umuyobozi mukuru",
463464
"Andela": "Andela",
464465
"University of Rwanda": "Kaminuza y' u Rwanda"
465-
}
466+
}

Diff for: src/Chart/BarChart.tsx

+101
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
import React from 'react';
2+
import { Bar } from 'react-chartjs-2';
3+
import {
4+
Chart as ChartJS,
5+
CategoryScale,
6+
LinearScale,
7+
BarElement,
8+
Title,
9+
Tooltip,
10+
Legend,
11+
} from 'chart.js';
12+
13+
ChartJS.register(
14+
CategoryScale,
15+
LinearScale,
16+
BarElement,
17+
Title,
18+
Tooltip,
19+
Legend,
20+
);
21+
22+
interface Props {}
23+
24+
// eslint-disable-next-line react/function-component-definition
25+
const BarChart: React.FC<Props> = () => {
26+
const data = {
27+
labels: [
28+
'01',
29+
'02',
30+
'03',
31+
'04',
32+
'05',
33+
'06',
34+
'07',
35+
'08',
36+
'09',
37+
'10',
38+
'11',
39+
'12',
40+
],
41+
datasets: [
42+
{
43+
label: 'Nova',
44+
data: [12, 19, 3, 5, 2, 3, 12, 14, 5, 7, 9, 11],
45+
backgroundColor: '#5A6ACF',
46+
borderRadius: 0,
47+
barThickness: 8,
48+
},
49+
{
50+
label: 'Fighters',
51+
data: [10, 15, 5, 8, 6, 9, 13, 9, 6, 8, 7, 10],
52+
backgroundColor: '#D1D5DB',
53+
borderRadius: 0,
54+
barThickness: 8,
55+
},
56+
],
57+
};
58+
59+
const options = {
60+
responsive: true,
61+
maintainAspectRatio: false,
62+
plugins: {
63+
legend: {
64+
position: 'bottom' as const,
65+
labels: {
66+
color: '#D1D5DB',
67+
},
68+
},
69+
tooltip: {
70+
enabled: true,
71+
},
72+
},
73+
scales: {
74+
x: {
75+
grid: {
76+
display: false,
77+
},
78+
ticks: {
79+
color: '#737B8B',
80+
},
81+
},
82+
y: {
83+
grid: {
84+
borderDash: [5, 5],
85+
color: '#ffffff',
86+
},
87+
ticks: {
88+
color: '#ffffff',
89+
},
90+
},
91+
},
92+
};
93+
94+
return (
95+
<div className="w-full h-[300px]">
96+
<Bar data={data} options={options} className="-ml-8" />
97+
</div>
98+
);
99+
};
100+
101+
export default BarChart;

Diff for: src/Chart/PieChart.tsx

+96
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
import React from 'react';
2+
import { Doughnut } from 'react-chartjs-2';
3+
import { Chart as ChartJS, ArcElement, Tooltip, Legend } from 'chart.js';
4+
5+
ChartJS.register(ArcElement, Tooltip, Legend);
6+
7+
// eslint-disable-next-line react/function-component-definition
8+
const PieChart: React.FC = () => {
9+
const data = {
10+
labels: ['new pie chart'],
11+
datasets: [
12+
{
13+
label: 'rates',
14+
data: [30, 100],
15+
backgroundColor: ['#4F46E5', '#A5B4FC'],
16+
hoverOffset: 4,
17+
},
18+
],
19+
};
20+
const data2 = {
21+
labels: ['new pie chart'],
22+
datasets: [
23+
{
24+
label: 'rates',
25+
data: [30, 70],
26+
backgroundColor: ['#4F46E5', '#A5B4FC'],
27+
hoverOffset: 4,
28+
},
29+
],
30+
};
31+
const data3 = {
32+
labels: ['new pie chart'],
33+
datasets: [
34+
{
35+
label: 'rates',
36+
data: [60, 60],
37+
backgroundColor: ['#4F46E5', '#A5B4FC'],
38+
hoverOffset: 4,
39+
},
40+
],
41+
};
42+
43+
const options = {
44+
responsive: true,
45+
cutout: '70%',
46+
plugins: {
47+
tooltip: {
48+
callbacks: {
49+
// eslint-disable-next-line func-names, object-shorthand
50+
label: function (tooltipItem: any) {
51+
return `${tooltipItem.label}: ${tooltipItem.raw}%`;
52+
},
53+
},
54+
},
55+
legend: {
56+
display: false,
57+
},
58+
},
59+
};
60+
61+
return (
62+
<div className="flex flex-col items-center -ml-8 mb-8">
63+
<div className="flex space-x-8">
64+
<div className="relative w-[200px] h-[200px] bg-red-200 p-2 rounded">
65+
<Doughnut data={data} options={options} />
66+
<div className="absolute inset-0 flex items-center justify-center">
67+
<div className="text-center">
68+
<p className="text-2xl font-semibold text-gray-500">10</p>
69+
</div>
70+
</div>
71+
<p className="text-center mt-2">New Invitations & Registration</p>
72+
</div>
73+
<div className="relative w-[200px] h-[200px] bg-green-200 p-2 rounded">
74+
<Doughnut data={data2} options={options} />
75+
<div className="absolute inset-0 flex items-center justify-center">
76+
<div className="text-center">
77+
<p className="text-2xl font-semibold text-gray-500">20</p>
78+
</div>
79+
</div>
80+
<p className="text-center mt-2">Upcoming Events</p>
81+
</div>
82+
<div className="relative w-[200px] h-[200px] bg-yellow-200 p-2 rounded">
83+
<Doughnut data={data3} options={options} />
84+
<div className="absolute inset-0 flex items-center justify-center">
85+
<div className="text-center">
86+
<p className="text-2xl font-semibold text-gray-500">50</p>
87+
</div>
88+
</div>
89+
<p className="text-center mt-2">Active& Progressive Tickets</p>
90+
</div>
91+
</div>
92+
</div>
93+
);
94+
};
95+
96+
export default PieChart;

Diff for: src/Chart/UsersChart.tsx

+113
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
import React from 'react';
2+
import { Line } from 'react-chartjs-2';
3+
import {
4+
Chart as ChartJS,
5+
CategoryScale,
6+
LinearScale,
7+
PointElement,
8+
LineElement,
9+
Title,
10+
Tooltip,
11+
Legend,
12+
} from 'chart.js';
13+
14+
ChartJS.register(
15+
CategoryScale,
16+
LinearScale,
17+
PointElement,
18+
LineElement,
19+
Title,
20+
Tooltip,
21+
Legend,
22+
);
23+
24+
// eslint-disable-next-line react/function-component-definition
25+
const usersChart: React.FC = () => {
26+
const data = {
27+
labels: [
28+
'01',
29+
'02',
30+
'03',
31+
'04',
32+
'05',
33+
'06',
34+
'07',
35+
'08',
36+
'09',
37+
'10',
38+
'11',
39+
'12',
40+
'13',
41+
'14',
42+
'15',
43+
'16',
44+
'17',
45+
'18',
46+
'19',
47+
'20',
48+
'21',
49+
'22',
50+
'23',
51+
'24',
52+
'25',
53+
'26',
54+
'27',
55+
'28',
56+
'29',
57+
'30',
58+
'31',
59+
],
60+
datasets: [
61+
{
62+
label: 'Andela',
63+
data: [
64+
1, 3, 0, 2, 1, 3, 2, 0, 2, 1, 3, 0, 2, 1, 4, 1, 2, 4, 7, 2, 3, 4, 4,
65+
3, 8, 0, 3, 5, 7,
66+
],
67+
fill: false,
68+
borderColor: '#4F46E5',
69+
tension: 0.4,
70+
},
71+
{
72+
label: 'NESA',
73+
data: [
74+
2, 3, 6, 4, 3, 4, 2, 1, 2, 6, 2, 2, 3, 2, 3, 5, 7, 2, 1, 2, 4, 6, 6,
75+
1, 2, 3, 4, 5, 6.5,
76+
],
77+
fill: false,
78+
borderColor: '#8C8120',
79+
tension: 0.4,
80+
},
81+
],
82+
};
83+
84+
const options = {
85+
responsive: true,
86+
plugins: {
87+
legend: {
88+
position: 'bottom' as const,
89+
},
90+
},
91+
scales: {
92+
y: {
93+
beginAtZero: true,
94+
grid: {
95+
color: '#D1D5DB',
96+
},
97+
},
98+
x: {
99+
grid: {
100+
display: false,
101+
},
102+
},
103+
},
104+
};
105+
106+
return (
107+
<div className="w-full h-[300px]">
108+
<Line data={data} options={options} className="-ml-8" />
109+
</div>
110+
);
111+
};
112+
113+
export default usersChart;

0 commit comments

Comments
 (0)