Skip to content

Commit

Permalink
admin dashoard functinality
Browse files Browse the repository at this point in the history
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
  • Loading branch information
GSinseswa721 authored and Bananayosostene committed Nov 22, 2024
1 parent 7d28c4f commit f3d9c53
Show file tree
Hide file tree
Showing 15 changed files with 908 additions and 24 deletions.
3 changes: 2 additions & 1 deletion public/locales/fr/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,7 @@
"Sprint Ratings": "Sprint Notations",
"Please wait to be added to a program or cohort": "Veuillez attendre d'être ajouté à un programme ou à une cohorte",
"Select all the required information": "Entrez toutes les informations requises",
"Enter all the required information": "Entrez toutes les informations requises",
"Are you sure you want to delete this user?": "Êtes-vous sûr de vouloir supprimer cet utilisateur ?",
"Come shape the future together": "Venez former l'avenir ensemble",
"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",
Expand All @@ -473,4 +474,4 @@
"Director": "Directeur",
"Andela": "Andela",
"University of Rwanda": "Université du Rwanda"
}
}
3 changes: 2 additions & 1 deletion public/locales/kn/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,7 @@
"Sprint Ratings": "Amanota ya Sprint",
"Please wait to be added to a program or cohort": "Tegereza tukongere muri porogarame cyangwa itsinda",
"Select all the required information": "Shyiramo amakuru yose asabwa",
"Enter all the required information": "Shyiramo amakuru yose asabwa",
"Are you sure you want to delete this user?": "urashaka kwemeza ikigikorwa cyo gusiba uyumuntu ?",
"Come shape the future together": "Dufatanye kwubaka ejo Hazaza",
"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.",
Expand All @@ -462,4 +463,4 @@
"Director": "Umuyobozi mukuru",
"Andela": "Andela",
"University of Rwanda": "Kaminuza y' u Rwanda"
}
}
101 changes: 101 additions & 0 deletions src/Chart/BarChart.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
import React from 'react';
import { Bar } from 'react-chartjs-2';
import {
Chart as ChartJS,
CategoryScale,
LinearScale,
BarElement,
Title,
Tooltip,
Legend,
} from 'chart.js';

ChartJS.register(
CategoryScale,
LinearScale,
BarElement,
Title,
Tooltip,
Legend,
);

interface Props {}

// eslint-disable-next-line react/function-component-definition
const BarChart: React.FC<Props> = () => {
const data = {
labels: [
'01',
'02',
'03',
'04',
'05',
'06',
'07',
'08',
'09',
'10',
'11',
'12',
],
datasets: [
{
label: 'Nova',
data: [12, 19, 3, 5, 2, 3, 12, 14, 5, 7, 9, 11],
backgroundColor: '#5A6ACF',
borderRadius: 0,
barThickness: 8,
},
{
label: 'Fighters',
data: [10, 15, 5, 8, 6, 9, 13, 9, 6, 8, 7, 10],
backgroundColor: '#D1D5DB',
borderRadius: 0,
barThickness: 8,
},
],
};

const options = {
responsive: true,
maintainAspectRatio: false,
plugins: {
legend: {
position: 'bottom' as const,
labels: {
color: '#D1D5DB',
},
},
tooltip: {
enabled: true,
},
},
scales: {
x: {
grid: {
display: false,
},
ticks: {
color: '#737B8B',
},
},
y: {
grid: {
borderDash: [5, 5],
color: '#ffffff',
},
ticks: {
color: '#ffffff',
},
},
},
};

return (
<div className="w-full h-[300px]">
<Bar data={data} options={options} className="-ml-8" />
</div>
);
};

export default BarChart;
96 changes: 96 additions & 0 deletions src/Chart/PieChart.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
import React from 'react';
import { Doughnut } from 'react-chartjs-2';
import { Chart as ChartJS, ArcElement, Tooltip, Legend } from 'chart.js';

ChartJS.register(ArcElement, Tooltip, Legend);

// eslint-disable-next-line react/function-component-definition
const PieChart: React.FC = () => {
const data = {
labels: ['new pie chart'],
datasets: [
{
label: 'rates',
data: [30, 100],
backgroundColor: ['#4F46E5', '#A5B4FC'],
hoverOffset: 4,
},
],
};
const data2 = {
labels: ['new pie chart'],
datasets: [
{
label: 'rates',
data: [30, 70],
backgroundColor: ['#4F46E5', '#A5B4FC'],
hoverOffset: 4,
},
],
};
const data3 = {
labels: ['new pie chart'],
datasets: [
{
label: 'rates',
data: [60, 60],
backgroundColor: ['#4F46E5', '#A5B4FC'],
hoverOffset: 4,
},
],
};

const options = {
responsive: true,
cutout: '70%',
plugins: {
tooltip: {
callbacks: {
// eslint-disable-next-line func-names, object-shorthand
label: function (tooltipItem: any) {
return `${tooltipItem.label}: ${tooltipItem.raw}%`;
},
},
},
legend: {
display: false,
},
},
};

return (
<div className="flex flex-col items-center -ml-8 mb-8">
<div className="flex space-x-8">
<div className="relative w-[200px] h-[200px] bg-red-200 p-2 rounded">
<Doughnut data={data} options={options} />
<div className="absolute inset-0 flex items-center justify-center">
<div className="text-center">
<p className="text-2xl font-semibold text-gray-500">10</p>
</div>
</div>
<p className="text-center mt-2">New Invitations & Registration</p>
</div>
<div className="relative w-[200px] h-[200px] bg-green-200 p-2 rounded">
<Doughnut data={data2} options={options} />
<div className="absolute inset-0 flex items-center justify-center">
<div className="text-center">
<p className="text-2xl font-semibold text-gray-500">20</p>
</div>
</div>
<p className="text-center mt-2">Upcoming Events</p>
</div>
<div className="relative w-[200px] h-[200px] bg-yellow-200 p-2 rounded">
<Doughnut data={data3} options={options} />
<div className="absolute inset-0 flex items-center justify-center">
<div className="text-center">
<p className="text-2xl font-semibold text-gray-500">50</p>
</div>
</div>
<p className="text-center mt-2">Active& Progressive Tickets</p>
</div>
</div>
</div>
);
};

export default PieChart;
113 changes: 113 additions & 0 deletions src/Chart/UsersChart.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
import React from 'react';
import { Line } from 'react-chartjs-2';
import {
Chart as ChartJS,
CategoryScale,
LinearScale,
PointElement,
LineElement,
Title,
Tooltip,
Legend,
} from 'chart.js';

ChartJS.register(
CategoryScale,
LinearScale,
PointElement,
LineElement,
Title,
Tooltip,
Legend,
);

// eslint-disable-next-line react/function-component-definition
const usersChart: React.FC = () => {
const data = {
labels: [
'01',
'02',
'03',
'04',
'05',
'06',
'07',
'08',
'09',
'10',
'11',
'12',
'13',
'14',
'15',
'16',
'17',
'18',
'19',
'20',
'21',
'22',
'23',
'24',
'25',
'26',
'27',
'28',
'29',
'30',
'31',
],
datasets: [
{
label: 'Andela',
data: [
1, 3, 0, 2, 1, 3, 2, 0, 2, 1, 3, 0, 2, 1, 4, 1, 2, 4, 7, 2, 3, 4, 4,
3, 8, 0, 3, 5, 7,
],
fill: false,
borderColor: '#4F46E5',
tension: 0.4,
},
{
label: 'NESA',
data: [
2, 3, 6, 4, 3, 4, 2, 1, 2, 6, 2, 2, 3, 2, 3, 5, 7, 2, 1, 2, 4, 6, 6,
1, 2, 3, 4, 5, 6.5,
],
fill: false,
borderColor: '#8C8120',
tension: 0.4,
},
],
};

const options = {
responsive: true,
plugins: {
legend: {
position: 'bottom' as const,
},
},
scales: {
y: {
beginAtZero: true,
grid: {
color: '#D1D5DB',
},
},
x: {
grid: {
display: false,
},
},
},
};

return (
<div className="w-full h-[300px]">
<Line data={data} options={options} className="-ml-8" />
</div>
);
};

export default usersChart;
Loading

0 comments on commit f3d9c53

Please sign in to comment.