@@ -9,6 +9,7 @@ import { useGetRowerStats } from "../utils/getRowerStats";
99import { CalculatorIcon } from "@heroicons/react/16/solid" ;
1010import { ClockIcon } from "@heroicons/react/16/solid" ;
1111import { ChartBarIcon } from "@heroicons/react/16/solid" ;
12+ import { AcademicCapIcon } from "@heroicons/react/16/solid" ;
1213
1314export const RowerStats = ( { rowerId } : { rowerId : string } ) => {
1415 const {
@@ -19,8 +20,14 @@ export const RowerStats = ({ rowerId }: { rowerId: string }) => {
1920 const [ selectedSeason , setSelectedSeason ] = useState (
2021 getSeasonDate ( new Date ( ) )
2122 ) ;
22- const { count, totalDuration, mostUsedBoats, mostFrequentPartners } =
23- useGetRowerStats ( rowerId , selectedSeason ) ;
23+ const {
24+ count,
25+ totalDuration,
26+ mostUsedBoats,
27+ mostFrequentPartners,
28+ coachedSessionsCount,
29+ coachedSessionsPercentage,
30+ } = useGetRowerStats ( rowerId , selectedSeason ) ;
2431 const { getBoatById, getRowerById } = useClubOverviewStore ( ) ;
2532
2633 if ( count === undefined ) return < Loading /> ;
@@ -39,7 +46,7 @@ export const RowerStats = ({ rowerId }: { rowerId: string }) => {
3946 />
4047 </ div >
4148
42- < div className = "grid grid-cols-3 gap-2" >
49+ < div className = "grid grid-cols-2 gap-2 mb-4 " >
4350 < div className = "bg-white rounded-lg shadow-sm border p-4 flex items-center gap-4" >
4451 < div className = "p-3 bg-steel-blue-50 rounded-lg" >
4552 < ChartBarIcon className = "w-6 h-6 text-steel-blue-600" />
@@ -79,10 +86,24 @@ export const RowerStats = ({ rowerId }: { rowerId: string }) => {
7986 </ p >
8087 </ div >
8188 </ div >
89+
90+ < div className = "bg-white rounded-lg shadow-sm border p-4 flex items-center gap-4" >
91+ < div className = "p-3 bg-steel-blue-50 rounded-lg" >
92+ < AcademicCapIcon className = "w-6 h-6 text-steel-blue-600" />
93+ </ div >
94+ < div >
95+ < h3 className = "text-sm text-gray-500 font-medium" >
96+ Sessions encadrées
97+ </ h3 >
98+ < p className = "text-xl font-semibold text-gray-900" >
99+ { coachedSessionsCount } ({ coachedSessionsPercentage . toFixed ( 2 ) } %)
100+ </ p >
101+ </ div >
102+ </ div >
82103 </ div >
83104
84105 < div className = "flex w-full justify-between" >
85- < div className = "flex-1 flex flex-col items-start" >
106+ < div className = "flex-1 flex flex-col items-start" >
86107 < h1 className = "font-medium text-lg mb-2 mt-4" >
87108 Bateaux les plus utilisés
88109 </ h1 >
0 commit comments