From e0f30fde85060bde67822c5888c72887cc9c6c8e Mon Sep 17 00:00:00 2001 From: Simon Nedjari Date: Mon, 27 May 2024 13:58:31 +0200 Subject: [PATCH 1/3] add ClassesExchangesCard component and module --- .../ClassesExchangesCard.module.css | 30 ++++++++++++ .../ClassesExchangesCard.tsx | 46 +++++++++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 src/components/admin/dashboard-statistics/cards/ClassesExchangesCard/ClassesExchangesCard.module.css create mode 100644 src/components/admin/dashboard-statistics/cards/ClassesExchangesCard/ClassesExchangesCard.tsx diff --git a/src/components/admin/dashboard-statistics/cards/ClassesExchangesCard/ClassesExchangesCard.module.css b/src/components/admin/dashboard-statistics/cards/ClassesExchangesCard/ClassesExchangesCard.module.css new file mode 100644 index 000000000..e35c49aec --- /dev/null +++ b/src/components/admin/dashboard-statistics/cards/ClassesExchangesCard/ClassesExchangesCard.module.css @@ -0,0 +1,30 @@ +.cardContainer { + background-color: #F5F5F5; + padding: .5rem 1rem; + border-radius: 1rem; + font-weight: 600; +} + +.cardContainer>div { + display: flex; + justify-content: space-around; + flex-wrap: wrap; +} + +.cardContainerExchange>div { + font-size: 3rem; + display: flex; + justify-content: center; + align-items: center; + margin: 0; + padding: 0; + color: #DAD7FE; +} + +.cardContainerExchange>div>p { + align-items: center; + color: #4C3ED9; + margin: 0; + padding: 0; + display: flex; +} \ No newline at end of file diff --git a/src/components/admin/dashboard-statistics/cards/ClassesExchangesCard/ClassesExchangesCard.tsx b/src/components/admin/dashboard-statistics/cards/ClassesExchangesCard/ClassesExchangesCard.tsx new file mode 100644 index 000000000..78d0bf7b6 --- /dev/null +++ b/src/components/admin/dashboard-statistics/cards/ClassesExchangesCard/ClassesExchangesCard.tsx @@ -0,0 +1,46 @@ +import React from 'react'; + +import ChatBubbleOutlineIcon from '@mui/icons-material/ChatBubbleOutline'; +import DescriptionIcon from '@mui/icons-material/Description'; +import YouTubeIcon from '@mui/icons-material/YouTube'; + +import styles from './ClassesExchangesCard.module.css'; + +interface ClassesExchangesCardProps { + totalPublications: number; + totalComments: number; + totalVideos: number; +} + +const ClassesExchangesCard = ({ totalPublications, totalComments, totalVideos }: ClassesExchangesCardProps) => { + return ( +
+

Résumé des échanges sur 1village

+
+
+
+ +

{totalPublications}

+
+

Total des publications

+
+
+
+ +

{totalComments}

+
+

Commentaires

+
+
+
+ +

{totalVideos}

+
+

Vidéos en ligne

+
+
+
+ ); +}; + +export default ClassesExchangesCard; From 6d64fa0beac03d1ed41af81848e440da04fbba2d Mon Sep 17 00:00:00 2001 From: Simon Nedjari Date: Mon, 27 May 2024 13:59:58 +0200 Subject: [PATCH 2/3] add ClassesExchangesCard in global --- src/components/admin/dashboard-statistics/GlobalStats.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/admin/dashboard-statistics/GlobalStats.tsx b/src/components/admin/dashboard-statistics/GlobalStats.tsx index 924fd93a8..d3ffc6583 100644 --- a/src/components/admin/dashboard-statistics/GlobalStats.tsx +++ b/src/components/admin/dashboard-statistics/GlobalStats.tsx @@ -18,6 +18,9 @@ const GlobalStats = () => { Temps de connexion moyen par classe +
+ +
); }; From e7a8ef2db6d5d7750c1285f705488a6425aaf772 Mon Sep 17 00:00:00 2001 From: Simon Nedjari Date: Mon, 27 May 2024 14:01:04 +0200 Subject: [PATCH 3/3] add ClassesExchangesCard import --- src/components/admin/dashboard-statistics/GlobalStats.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/admin/dashboard-statistics/GlobalStats.tsx b/src/components/admin/dashboard-statistics/GlobalStats.tsx index d3ffc6583..bea7e3cb1 100644 --- a/src/components/admin/dashboard-statistics/GlobalStats.tsx +++ b/src/components/admin/dashboard-statistics/GlobalStats.tsx @@ -3,6 +3,7 @@ import React from 'react'; import AccessTimeIcon from '@mui/icons-material/AccessTime'; import AverageStatsCard from './cards/AverageStatsCard/AverageStatsCard'; +import ClassesExchangesCard from './cards/ClassesExchangesCard/ClassesExchangesCard'; import StatsCard from './cards/StatsCard/StatsCard'; const GlobalStats = () => {