@ -3,79 +3,154 @@ import { useParams, Link } from 'react-router-dom'
import classe from '../assets/AllStyleComponents.module.css'
import classe from '../assets/AllStyleComponents.module.css'
import classeHome from '../assets/Home.module.css'
import classeHome from '../assets/Home.module.css'
import Paper from '@mui/material/Paper'
import Paper from '@mui/material/Paper'
import { Button , Modal , Box , Tabs , Tab , Select , MenuItem , FormControl , InputLabel } from '@mui/material'
import { Button , Tabs , Tab , Select , MenuItem , FormControl , InputLabel } from '@mui/material'
import { IoMdReturnRight } from 'react-icons/io'
import { IoMdReturnRight } from 'react-icons/io'
import jsPDF from 'jspdf'
import jsPDF from 'jspdf'
import autoTable from 'jspdf-autotable'
import autoTable from 'jspdf-autotable'
import { FaDownload } from 'react-icons/fa'
import { FaDownload } from 'react-icons/fa'
import logoRelerev1 from '../assets/logorelever.png'
import logoRelerev1 from '../assets/logorelever.png'
import logoRelerev2 from '../assets/logorelever2.png'
import logoRelerev2 from '../assets/logorelever2.png'
import getSemestre from './function/GetSemestre'
const Resultat = ( ) => {
const Resultat = ( ) => {
const { niveau , scolaire } = useParams ( )
const { niveau , scolaire } = useParams ( )
const formData = {
const formData = { niveau , scolaire }
niveau ,
scolaire
}
const [ etudiants , setEtudiants ] = useState ( [ ] )
const [ etudiants , setEtudiants ] = useState ( [ ] )
const [ mention , setMention ] = useState ( [ ] )
const [ mention , setMention ] = useState ( [ ] )
const [ session , setSession ] = useState ( [ ] )
const [ session , setSession ] = useState ( [ ] )
const [ tabValue , setTabValue ] = useState ( 0 )
const [ tabValue , setTabValue ] = useState ( 0 )
/ / É t a t s p o u r l e s s é l e c t i o n s
const [ selectedMatiere , setSelectedMatiere ] = useState ( '' )
const [ selectedMatiere , setSelectedMatiere ] = useState ( '' )
const [ selectedUE , setSelectedUE ] = useState ( '' )
const [ selectedUE , setSelectedUE ] = useState ( '' )
const [ selectedMentionId , setSelectedMentionId ] = useState ( '' )
const [ availableMatieres , setAvailableMatieres ] = useState ( [ ] )
const [ availableMatieres , setAvailableMatieres ] = useState ( [ ] )
const [ availableUEs , setAvailableUEs ] = useState ( [ ] )
const [ availableUEs , setAvailableUEs ] = useState ( [ ] )
const [ moyennesRattrapage , setMoyennesRattrapage ] = useState ( [ ] )
useEffect ( ( ) => {
useEffect ( ( ) => {
window . notes . getMoyenne ( formData ) . then ( ( response ) => {
const fetchData = async ( ) => {
setEtudiants ( response )
try {
extractMatieresAndUEs ( response )
const etudiantsData = await window . notes . getMoyenne ( formData )
setEtudiants ( etudiantsData )
extractMatieresAndUEs ( etudiantsData )
const sessionData = await window . noteRepech . getMoyenneRepech ( formData )
setSession ( sessionData )
const mentionData = await window . mention . getMention ( )
setMention ( mentionData )
if ( mentionData . length > 0 ) {
setSelectedMentionId ( mentionData [ 0 ] . id )
}
await calculerMoyennesRattrapage ( etudiantsData )
} catch ( error ) {
console . error ( 'Erreur lors du chargement des données:' , error )
}
}
fetchData ( )
} , [ niveau , scolaire ] )
const calculerMoyennesRattrapage = async ( etudiantsData ) => {
const moyennes = [ ]
for ( let i = 0 ; i < etudiantsData . length ; i ++ ) {
if ( etudiantsData [ i ] && etudiantsData [ i ] [ 0 ] ) {
const etudiantId = etudiantsData [ i ] [ 0 ] . etudiant_id
const etudiantInfo = etudiantsData [ i ] [ 0 ]
try {
const notesData = await window . notes . noteRelerer ( {
id : etudiantId ,
anneescolaire : scolaire ,
niveau : niveau
} )
} )
window . noteRepech . getMoyenneRepech ( formData ) . then ( ( response ) => {
if ( notesData && notesData . noteNormal && notesData . noteRepech && notesData . semestre ) {
setSession ( response )
const updatedMatieres = notesData . noteNormal . map ( ( matiere ) => {
const semesters = getSemestre ( matiere . etudiant_niveau )
const matchedSemestre = notesData . semestre . find (
( sem ) =>
sem . matiere_id === matiere . matiere_id &&
sem . mention_id === matiere . mention_id &&
( sem . nom === semesters [ 0 ] || sem . nom === semesters [ 1 ] )
)
return { ... matiere , semestre : matchedSemestre ? matchedSemestre . nom : null }
} )
} )
window . mention . getMention ( ) . then ( ( response ) => {
const updatedMatieresRepech = notesData . noteRepech . map ( ( matiere ) => {
setMention ( response )
const semesters = getSemestre ( matiere . etudiant_niveau )
const matchedSemestre = notesData . semestre . find (
( sem ) =>
sem . matiere_id === matiere . matiere_id &&
sem . mention_id === matiere . mention_id &&
( sem . nom === semesters [ 0 ] || sem . nom === semesters [ 1 ] )
)
return { ... matiere , semestre : matchedSemestre ? matchedSemestre . nom : null }
} )
} )
} , [ ] )
let aRattrapage = false
updatedMatieres . forEach ( ( item1 ) => {
let matchingItem = updatedMatieresRepech . find (
( item2 ) => item2 . matiere_id === item1 . matiere_id
)
item1 . noterepech = matchingItem ? matchingItem . note : null
if ( item1 . noterepech !== null && item1 . noterepech !== undefined && Number ( item1 . noterepech ) > 0 ) {
aRattrapage = true
}
} )
if ( aRattrapage ) {
const moyenne = calculerMoyennePonderee ( updatedMatieres )
moyennes . push ( {
id : etudiantId ,
nom : etudiantInfo . nom ,
prenom : etudiantInfo . prenom ,
mention : etudiantInfo . mention_id ,
moyenne : moyenne . toFixed ( 2 ) ,
admis : moyenne >= 10
} )
}
}
} catch ( error ) {
console . error ( ` Erreur pour l'étudiant ${ etudiantId } : ` , error )
}
}
}
setMoyennesRattrapage ( moyennes )
}
const calculerMoyennePonderee = ( matieres ) => {
let totalNotesPonderees = 0
let totalCredits = 0
matieres . forEach ( ( matiere ) => {
let noteFinale
const noteRepechValide = matiere . noterepech !== null && matiere . noterepech !== undefined && Number ( matiere . noterepech ) > 0
if ( noteRepechValide ) {
noteFinale = Math . max ( Number ( matiere . note ) , Number ( matiere . noterepech ) )
} else {
noteFinale = Number ( matiere . note )
}
if ( noteFinale != null && ! isNaN ( noteFinale ) ) {
totalNotesPonderees += noteFinale * Number ( matiere . credit )
totalCredits += Number ( matiere . credit )
}
} )
return totalCredits > 0 ? totalNotesPonderees / totalCredits : 0
}
/ / F o n c t i o n p o u r e x t r a i r e l e s m a t i è r e s e t U E s d i s p o n i b l e s
const extractMatieresAndUEs = ( data ) => {
const extractMatieresAndUEs = ( data ) => {
const matieres = new Set ( )
const matieres = new Map ( ) / / k e y = n o m M a t , v a l u e = m e n t i o n _ i d
const ues = new Set ( )
const ues = new Set ( )
for ( let index = 0 ; index < data . length ; index ++ ) {
for ( let index = 0 ; index < data . length ; index ++ ) {
for ( let j = 0 ; j < data [ index ] . length ; j ++ ) {
for ( let j = 0 ; j < data [ index ] . length ; j ++ ) {
const matiere = data [ index ] [ j ] . matiere || ` Matière ${ j + 1 } `
const no mM at = data [ index ] [ j ] . no mM at || ` Matière ${ j + 1 } `
const ue = data [ index ] [ j ] . ue || ` UE ${ Math . floor ( j / 2 ) + 1 } `
const ue = data [ index ] [ j ] . ue || ` UE ${ Math . floor ( j / 2 ) + 1 } `
matieres . add ( matiere )
if ( ! matieres . has ( nomMat ) ) matieres . set ( nomMat , data [ index ] [ j ] . mention_id )
ues . add ( ue )
ues . add ( ue )
}
}
}
}
setAvailableMatieres ( Array . from ( matieres . keys ( ) ) )
setAvailableMatieres ( Array . from ( matieres ) )
setAvailableUEs ( Array . from ( ues ) )
setAvailableUEs ( Array . from ( ues ) )
if ( matieres . size > 0 ) setSelectedMatiere ( Array . from ( matieres . keys ( ) ) [ 0 ] )
/ / S é l e c t i o n n e r l a p r e m i è r e m a t i è r e e t U E p a r d é f a u t
if ( matieres . size > 0 ) setSelectedMatiere ( Array . from ( matieres ) [ 0 ] )
if ( ues . size > 0 ) setSelectedUE ( Array . from ( ues ) [ 0 ] )
if ( ues . size > 0 ) setSelectedUE ( Array . from ( ues ) [ 0 ] )
}
}
let dataToMap = [ ]
function returnmention ( id ) {
function returnmention ( id ) {
let mentions
const found = mention . find ( ( m ) => m . id === id )
for ( let index = 0 ; index < mention . length ; index ++ ) {
return found ? found . nom : ''
if ( mention [ index ] . id == id ) {
mentions = mention [ index ] . nom
}
}
return mentions
}
}
/ / F o n c t i o n p o u r d é t e r m i n e r l a m e n t i o n s e l o n l a m o y e n n e
function getMentionFromMoyenne ( moyenne ) {
function getMentionFromMoyenne ( moyenne ) {
const moy = parseFloat ( moyenne )
const moy = parseFloat ( moyenne )
if ( moy >= 18 ) return 'Excellent'
if ( moy >= 18 ) return 'Excellent'
@ -87,102 +162,86 @@ const Resultat = () => {
return 'Remise à la famille'
return 'Remise à la famille'
}
}
function checkNull ( params ) {
if ( params == null || params == undefined ) {
return null
}
return params
}
function compareSessionNotes ( session1 , session2 ) {
function compareSessionNotes ( session1 , session2 ) {
let notes
if ( session2 ) {
if ( session2 ) {
if ( session1 < session2 . note ) {
return session1 < session2 . note ? session2 . note : session1
notes = session2 . note
} else {
notes = session1
}
}
} else {
return session1
notes = session1
}
return notes
}
}
/ / T r a i t e m e n t d e s d o n n é e s p o u r r é s u l t a t d é f i n i t i f - I N C L U A N T T O U S L E S É T U D I A N T S
const calculerMoyennesSessionNormale = ( ) => {
const moyennes = [ ]
for ( let index = 0 ; index < etudiants . length ; index ++ ) {
for ( let index = 0 ; index < etudiants . length ; index ++ ) {
let total = 0
if ( etudiants [ index ] && etudiants [ index ] [ 0 ] ) {
let note = 0
let totalNotesPonderees = 0
let totalCredit = 0
let totalCredits = 0
let hasValidNotes = false
let hasValidNotes = false
let modelJson = {
let modelJson = {
id : '' ,
id : etudiants [ index ] [ 0 ] . etudiant_id ,
nom : '' ,
nom : etudiants [ index ] [ 0 ] . nom ,
prenom : '' ,
prenom : etudiants [ index ] [ 0 ] . prenom ,
photos : '' ,
photos : etudiants [ index ] [ 0 ] . photos ,
moyenne : '' ,
mention : etudiants [ index ] [ 0 ] . mention_id ,
mention : '' ,
anneescolaire : etudiants [ index ] [ 0 ] . annee_scolaire ,
anneescolair e: ''
moyenn e : 'N/A '
}
}
for ( let j = 0 ; j < etudiants [ index ] . length ; j ++ ) {
for ( let j = 0 ; j < etudiants [ index ] . length ; j ++ ) {
modelJson . id = etudiants [ index ] [ j ] . etudiant_id
const noteNormale = Number ( etudiants [ index ] [ j ] . note )
modelJson . nom = etudiants [ index ] [ j ] . nom
const credit = Number ( etudiants [ index ] [ j ] . credit )
modelJson . prenom = etudiants [ index ] [ j ] . prenom
if ( noteNormale != null && ! isNaN ( noteNormale ) ) {
modelJson . photos = etudiants [ index ] [ j ] . photos
totalNotesPonderees += noteNormale * credit
modelJson . mention = etudiants [ index ] [ j ] . mention_id
totalCredits += credit
modelJson . anneescolaire = etudiants [ index ] [ j ] . annee_scolaire
let currentNote = etudiants [ index ] [ j ] . note
if ( session [ index ] ) {
currentNote = compareSessionNotes ( etudiants [ index ] [ j ] . note , checkNull ( session [ index ] [ j ] ) )
}
/ / V é r i f i e r s i l ' é t u d i a n t a d e s n o t e s v a l i d e s
if ( currentNote != null && currentNote != undefined && ! isNaN ( currentNote ) ) {
note += currentNote * etudiants [ index ] [ j ] . credit
totalCredit += etudiants [ index ] [ j ] . credit
hasValidNotes = true
hasValidNotes = true
}
}
}
}
if ( hasValidNotes && totalCredits > 0 ) {
modelJson . moyenne = ( totalNotesPonderees / totalCredits ) . toFixed ( 2 )
}
moyennes . push ( modelJson )
}
}
return moyennes . sort ( ( a , b ) => {
const moyA = a . moyenne === 'N/A' ? - 1 : parseFloat ( a . moyenne )
const moyB = b . moyenne === 'N/A' ? - 1 : parseFloat ( b . moyenne )
return moyB - moyA
} )
}
/ / C a l c u l e r l a m o y e n n e m ê m e s i c e r t a i n e s n o t e s m a n q u e n t
const sortedStudents = calculerMoyennesSessionNormale ( )
if ( hasValidNotes && totalCredit > 0 ) {
total = note / totalCredit
const getResultsRattrapageAdmis = ( ) => {
modelJson . moyenne = total . toFixed ( 2 )
return moyennesRattrapage . filter ( e => e . mention == selectedMentionId && e . admis ) . sort ( ( a , b ) => parseFloat ( b . moyenne ) - parseFloat ( a . moyenne ) )
} else {
modelJson . moyenne = 'N/A'
}
}
dataToMap . push ( modelJson )
const getResultsRattrapageNonAdmis = ( ) => {
return moyennesRattrapage . filter ( e => e . mention == selectedMentionId && ! e . admis ) . sort ( ( a , b ) => parseFloat ( b . moyenne ) - parseFloat ( a . moyenne ) )
}
const getResultsByMention = ( ) => {
return sortedStudents . filter ( s => s . mention == selectedMentionId )
}
}
/ / F o n c t i o n p o u r o b t e n i r l e s r é s u l t a t s p a r m a t i è r e s é l e c t i o n n é e
const getResultsByMatiere = ( ) => {
const getResultsByMatiere = ( ) => {
const results = [ ]
const results = [ ]
for ( let index = 0 ; index < etudiants . length ; index ++ ) {
for ( let index = 0 ; index < etudiants . length ; index ++ ) {
for ( let j = 0 ; j < etudiants [ index ] . length ; j ++ ) {
for ( let j = 0 ; j < etudiants [ index ] . length ; j ++ ) {
const matiere = etudiants [ index ] [ j ] . matiere || ` Matière ${ j + 1 } `
const no mM at = etudiants [ index ] [ j ] . no mM at || ` Matière ${ j + 1 } `
const mentionId = etudiants [ index ] [ j ] . mention_id
if ( matiere === selectedMatiere ) {
if ( nomMat === selectedMatiere && mentionId == selectedMentionId ) {
let finalNote = etudiants [ index ] [ j ] . note
let finalNote = etudiants [ index ] [ j ] . note
if ( session [ index ] && session [ index ] [ j ] ) {
if ( session [ index ] && session [ index ] [ j ] ) {
finalNote = compareSessionNotes ( etudiants [ index ] [ j ] . note , session [ index ] [ j ] )
finalNote = compareSessionNotes ( etudiants [ index ] [ j ] . note , session [ index ] [ j ] )
}
}
results . push ( {
results . push ( {
id : etudiants [ index ] [ j ] . etudiant_id ,
id : etudiants [ index ] [ j ] . etudiant_id ,
nom : etudiants [ index ] [ j ] . nom ,
nom : etudiants [ index ] [ j ] . nom ,
prenom : etudiants [ index ] [ j ] . prenom ,
prenom : etudiants [ index ] [ j ] . prenom ,
note : finalNote != null ? finalNote . toFixed ( 2 ) : 'N/A' ,
note : finalNote != null ? finalNote . toFixed ( 2 ) : 'N/A' ,
credit : etudiants [ index ] [ j ] . credit ,
credit : etudiants [ index ] [ j ] . credit
mention : returnmention ( etudiants [ index ] [ j ] . mention_id )
} )
} )
}
}
}
}
}
}
return results . sort ( ( a , b ) => {
return results . sort ( ( a , b ) => {
const noteA = a . note === 'N/A' ? - 1 : parseFloat ( a . note )
const noteA = a . note === 'N/A' ? - 1 : parseFloat ( a . note )
const noteB = b . note === 'N/A' ? - 1 : parseFloat ( b . note )
const noteB = b . note === 'N/A' ? - 1 : parseFloat ( b . note )
@ -190,21 +249,17 @@ const Resultat = () => {
} )
} )
}
}
/ / F o n c t i o n p o u r o b t e n i r l e s r é s u l t a t s p a r U E s é l e c t i o n n é e
const getResultsByUE = ( ) => {
const getResultsByUE = ( ) => {
const groupedStudents = { }
const groupedStudents = { }
const matieresInUE = new Set ( )
const matieresInUE = new Set ( )
/ / G r o u p e r l e s é t u d i a n t s e t c o l l e c t e r l e s m a t i è r e s d e l ' U E
for ( let index = 0 ; index < etudiants . length ; index ++ ) {
for ( let index = 0 ; index < etudiants . length ; index ++ ) {
for ( let j = 0 ; j < etudiants [ index ] . length ; j ++ ) {
for ( let j = 0 ; j < etudiants [ index ] . length ; j ++ ) {
const ue = etudiants [ index ] [ j ] . ue || ` UE ${ Math . floor ( j / 2 ) + 1 } `
const ue = etudiants [ index ] [ j ] . ue || ` UE ${ Math . floor ( j / 2 ) + 1 } `
const matiere = etudiants [ index ] [ j ] . matiere || ` Matière ${ j + 1 } `
const matiere = etudiants [ index ] [ j ] . no mM at || ` Matière ${ j + 1 } `
const mentionId = etudiants [ index ] [ j ] . mention_id
if ( ue === selectedUE ) {
if ( ue === selectedUE && mentionId == selectedMentionId ) {
matieresInUE . add ( matiere )
matieresInUE . add ( matiere )
const etudiantId = etudiants [ index ] [ j ] . etudiant_id
const etudiantId = etudiants [ index ] [ j ] . etudiant_id
if ( ! groupedStudents [ etudiantId ] ) {
if ( ! groupedStudents [ etudiantId ] ) {
groupedStudents [ etudiantId ] = {
groupedStudents [ etudiantId ] = {
id : etudiantId ,
id : etudiantId ,
@ -216,12 +271,10 @@ const Resultat = () => {
hasValidNotes : false
hasValidNotes : false
}
}
}
}
let finalNote = etudiants [ index ] [ j ] . note
let finalNote = etudiants [ index ] [ j ] . note
if ( session [ index ] && session [ index ] [ j ] ) {
if ( session [ index ] && session [ index ] [ j ] ) {
finalNote = compareSessionNotes ( etudiants [ index ] [ j ] . note , session [ index ] [ j ] )
finalNote = compareSessionNotes ( etudiants [ index ] [ j ] . note , session [ index ] [ j ] )
}
}
if ( finalNote != null && finalNote != undefined && ! isNaN ( finalNote ) ) {
if ( finalNote != null && finalNote != undefined && ! isNaN ( finalNote ) ) {
groupedStudents [ etudiantId ] . matieres [ matiere ] = finalNote . toFixed ( 2 )
groupedStudents [ etudiantId ] . matieres [ matiere ] = finalNote . toFixed ( 2 )
groupedStudents [ etudiantId ] . totalNote += finalNote * etudiants [ index ] [ j ] . credit
groupedStudents [ etudiantId ] . totalNote += finalNote * etudiants [ index ] [ j ] . credit
@ -233,14 +286,10 @@ const Resultat = () => {
}
}
}
}
}
}
const results = Object . values ( groupedStudents ) . map ( student => ( {
const results = Object . values ( groupedStudents ) . map ( student => ( {
... student ,
... student ,
moyenneUE : student . hasValidNotes && student . totalCredit > 0
moyenneUE : student . hasValidNotes && student . totalCredit > 0 ? ( student . totalNote / student . totalCredit ) . toFixed ( 2 ) : 'N/A'
? ( student . totalNote / student . totalCredit ) . toFixed ( 2 )
: 'N/A'
} ) )
} ) )
return {
return {
students : results . sort ( ( a , b ) => {
students : results . sort ( ( a , b ) => {
const moyA = a . moyenneUE === 'N/A' ? - 1 : parseFloat ( a . moyenneUE )
const moyA = a . moyenneUE === 'N/A' ? - 1 : parseFloat ( a . moyenneUE )
@ -251,12 +300,6 @@ const Resultat = () => {
}
}
}
}
const sortedStudents = dataToMap . sort ( ( a , b ) => {
const moyA = a . moyenne === 'N/A' ? - 1 : parseFloat ( a . moyenne )
const moyB = b . moyenne === 'N/A' ? - 1 : parseFloat ( b . moyenne )
return moyB - moyA
} )
const handleTabChange = ( event , newValue ) => {
const handleTabChange = ( event , newValue ) => {
setTabValue ( newValue )
setTabValue ( newValue )
}
}
@ -264,15 +307,9 @@ const Resultat = () => {
const print = ( ) => {
const print = ( ) => {
const generatePDF = ( ) => {
const generatePDF = ( ) => {
try {
try {
const pdf = new jsPDF ( {
const pdf = new jsPDF ( { orientation : 'portrait' , unit : 'mm' , format : 'a4' } )
orientation : 'portrait' ,
unit : 'mm' ,
format : 'a4'
} )
pdf . addImage ( logoRelerev1 , 'PNG' , 175 , 5 , 32 , 30 )
pdf . addImage ( logoRelerev1 , 'PNG' , 175 , 5 , 32 , 30 )
pdf . addImage ( logoRelerev2 , 'PNG' , 10 , 5 , 40 , 30 )
pdf . addImage ( logoRelerev2 , 'PNG' , 10 , 5 , 40 , 30 )
pdf . setFontSize ( 10 )
pdf . setFontSize ( 10 )
pdf . text ( 'REPOBLIKAN\'I MADAGASIKARA' , 105 , 10 , { align : 'center' } )
pdf . text ( 'REPOBLIKAN\'I MADAGASIKARA' , 105 , 10 , { align : 'center' } )
pdf . text ( 'Fitiavana-Tanindrazana-Fandrosoana' , 105 , 14 , { align : 'center' } )
pdf . text ( 'Fitiavana-Tanindrazana-Fandrosoana' , 105 , 14 , { align : 'center' } )
@ -282,37 +319,24 @@ const Resultat = () => {
pdf . text ( '********************' , 105 , 30 , { align : 'center' } )
pdf . text ( '********************' , 105 , 30 , { align : 'center' } )
pdf . text ( 'UNIVERSITÉ DE TOAMASINA' , 105 , 34 , { align : 'center' } )
pdf . text ( 'UNIVERSITÉ DE TOAMASINA' , 105 , 34 , { align : 'center' } )
pdf . text ( 'ÉCOLE SUPÉRIEURE POLYTECHNIQUE' , 105 , 38 , { align : 'center' } )
pdf . text ( 'ÉCOLE SUPÉRIEURE POLYTECHNIQUE' , 105 , 38 , { align : 'center' } )
const tableId = tabValue === 0 ? '#mentionTable' : tabValue === 1 ? '#rattrapageAdmisTable' : tabValue === 2 ? '#rattrapageNonAdmisTable' : tabValue === 3 ? '#subjectTable' : '#ueTable'
const tableId = tabValue === 0 ? '#resultTable' : tabValue === 1 ? '#subjectTable' : '#ueTable'
autoTable ( pdf , {
autoTable ( pdf , {
html : tableId ,
html : tableId ,
startY : 50 ,
startY : 50 ,
theme : 'grid' ,
theme : 'grid' ,
headStyles : {
headStyles : { fillColor : [ 255 , 255 , 255 ] , halign : 'center' , fontStyle : 'bold' , textColor : [ 0 , 0 , 0 ] , lineColor : [ 0 , 0 , 0 ] , lineWidth : 0.5 } ,
fillColor : [ 255 , 255 , 255 ] , / / F o n d b l a n c
styles : { fontSize : 8 , cellPadding : 2 , halign : 'center' , lineColor : [ 0 , 0 , 0 ] , lineWidth : 0.5 } ,
halign : 'center' ,
bodyStyles : { lineColor : [ 0 , 0 , 0 ] , lineWidth : 0.5 }
fontStyle : 'bold' ,
textColor : [ 0 , 0 , 0 ] , / / T e x t e n o i r
lineColor : [ 0 , 0 , 0 ] , / / B o r d u r e n o i r e
lineWidth : 0.5
} ,
styles : {
fontSize : 8 ,
cellPadding : 2 ,
halign : 'center' ,
lineColor : [ 0 , 0 , 0 ] , / / B o r d u r e n o i r e p o u r t o u t e s l e s c e l l u l e s
lineWidth : 0.5
} ,
bodyStyles : {
lineColor : [ 0 , 0 , 0 ] , / / B o r d u r e n o i r e p o u r l e c o r p s d u t a b l e a u
lineWidth : 0.5
}
} )
} )
if ( tabValue === 1 ) {
const suffix = tabValue === 0 ? 'definitif' :
const admis = getResultsRattrapageAdmis ( )
tabValue === 1 ? ` par-matiere- ${ selectedMatiere } ` :
const finalY = pdf . lastAutoTable . finalY || 50
` par-ue- ${ selectedUE } `
pdf . setFontSize ( 11 )
pdf . setFont ( undefined , 'bold' )
pdf . text ( ` Arrêt la liste des étudiants admis à ${ admis . length } ` , 105 , finalY + 15 , { align : 'center' } )
}
const selectedMentionName = returnmention ( selectedMentionId )
const suffix = tabValue === 0 ? ` session-normale- ${ selectedMentionName } ` : tabValue === 1 ? ` rattrapage-admis- ${ selectedMentionName } ` : tabValue === 2 ? ` rattrapage-non-admis- ${ selectedMentionName } ` : tabValue === 3 ? ` par-matiere- ${ selectedMatiere } ` : ` par-ue- ${ selectedUE } `
pdf . save ( ` Resultat- ${ suffix } - ${ niveau } - ${ scolaire } .pdf ` )
pdf . save ( ` Resultat- ${ suffix } - ${ niveau } - ${ scolaire } .pdf ` )
} catch ( error ) {
} catch ( error ) {
console . error ( 'Error generating PDF:' , error )
console . error ( 'Error generating PDF:' , error )
@ -322,27 +346,9 @@ const Resultat = () => {
}
}
const renderHeader = ( ) => (
const renderHeader = ( ) => (
< div
< div style = { { display : 'flex' , alignItems : 'flex-start' , justifyContent : 'space-between' , marginBottom : '20px' , position : 'relative' } } >
style = { {
display : 'flex' ,
alignItems : 'flex-start' ,
justifyContent : 'space-between' ,
marginBottom : '20px' ,
position : 'relative'
} }
>
< img src = { logoRelerev2 } alt = "Logo gauche" width = { 90 } height = { 90 } / >
< img src = { logoRelerev2 } alt = "Logo gauche" width = { 90 } height = { 90 } / >
< div style = { { position : 'absolute' , left : '50%' , transform : 'translateX(-50%)' , textAlign : 'center' , fontSize : '10px' , lineHeight : '1.2' } } >
< div
style = { {
position : 'absolute' ,
left : '50%' ,
transform : 'translateX(-50%)' ,
textAlign : 'center' ,
fontSize : '10px' ,
lineHeight : '1.2'
} }
>
< div style = { { fontWeight : 'bold' } } > REPOBLIKAN ' I MADAGASIKARA < / div >
< div style = { { fontWeight : 'bold' } } > REPOBLIKAN ' I MADAGASIKARA < / div >
< div style = { { fontStyle : 'italic' } } > Fitiavana - Tanindrazana - Fandrosoana < / div >
< div style = { { fontStyle : 'italic' } } > Fitiavana - Tanindrazana - Fandrosoana < / div >
< div > * * * * * * * * * * * * * * * * * * * * < / div >
< div > * * * * * * * * * * * * * * * * * * * * < / div >
@ -352,23 +358,28 @@ const Resultat = () => {
< div style = { { fontWeight : 'bold' } } > UNIVERSITÉ DE TOAMASINA < / div >
< div style = { { fontWeight : 'bold' } } > UNIVERSITÉ DE TOAMASINA < / div >
< div style = { { fontWeight : 'bold' } } > ÉCOLE SUPÉRIEURE POLYTECHNIQUE < / div >
< div style = { { fontWeight : 'bold' } } > ÉCOLE SUPÉRIEURE POLYTECHNIQUE < / div >
< / div >
< / div >
< img src = { logoRelerev1 } alt = "Logo droite" width = { 110 } height = { 90 } / >
< img src = { logoRelerev1 } alt = "Logo droite" width = { 110 } height = { 90 } / >
< / div >
< / div >
)
)
const renderResultDefinitif = ( ) => (
const renderResultParMention = ( ) => {
< table
const results = getResultsByMention ( )
className = "table table-bordered table-striped text-center shadow-sm"
const selectedMentionName = returnmention ( selectedMentionId )
id = "resultTable"
return (
style = { { fontSize : '12px' } }
< >
>
< div style = { { marginBottom : '20px' } } >
< FormControl fullWidth >
< InputLabel > Sélectionner une mention < / InputLabel >
< Select value = { selectedMentionId } onChange = { ( e ) => setSelectedMentionId ( e . target . value ) } label = "Sélectionner une mention" >
{ mention . map ( ( m ) => ( < MenuItem key = { m . id } value = { m . id } > { m . nom } < / MenuItem > ) ) }
< / Select >
< / FormControl >
< / div >
< table className = "table table-bordered table-striped text-center shadow-sm" id = "mentionTable" style = { { fontSize : '12px' } } >
< thead className = "table-secondary" >
< thead className = "table-secondary" >
< tr >
< tr >
< td colSpan = { 5 } className = "py-3" style = { { backgroundColor : '#f8f9fa' } } >
< td colSpan = { 5 } className = "py-3" style = { { backgroundColor : '#f8f9fa' } } >
< h6 style = { { margin : 0 , fontWeight : 'bold' } } >
< h6 style = { { margin : 0 , fontWeight : 'bold' } } > Session Normale - Résultat { niveau } pour la mention : { selectedMentionName } ( { results . length } étudiant { results . length > 1 ? 's' : '' } ) < / h6 >
Résultat Définitif : { niveau } admis en { niveau === 'L1' ? 'L2' : niveau === 'L2' ? 'L3' : 'Master' } par ordre de mérite
< / h6 >
< / td >
< / td >
< / tr >
< / tr >
< tr style = { { backgroundColor : '#e9ecef' } } >
< tr style = { { backgroundColor : '#e9ecef' } } >
@ -380,54 +391,134 @@ const Resultat = () => {
< / tr >
< / tr >
< / thead >
< / thead >
< tbody >
< tbody >
{ sortedStuden ts. map ( ( sorted , index ) => (
{ results . length > 0 ? ( resul ts . map ( ( sorted , index ) => (
< tr key = { sorted . id } >
< tr key = { sorted . id } >
< td style = { { fontWeight : 'bold' } } > { index + 1 } . < / td >
< td style = { { fontWeight : 'bold' } } > { index + 1 } . < / td >
< td style = { { textAlign : 'left' , paddingLeft : '10px' , fontWeight : 'bold' } } > { sorted . nom } < / td >
< td style = { { textAlign : 'left' , paddingLeft : '10px' , fontWeight : 'bold' } } > { sorted . nom } < / td >
< td style = { { textAlign : 'left' , paddingLeft : '10px' } } > { sorted . prenom } < / td >
< td style = { { textAlign : 'left' , paddingLeft : '10px' } } > { sorted . prenom } < / td >
< td style = { { fontWeight : 'bold' } } > { sorted . moyenne } < / td >
< td style = { { fontWeight : 'bold' } } > { sorted . moyenne } < / td >
< td style = { { fontWeight : 'bold' } } >
< td style = { { fontWeight : 'bold' } } > { sorted . moyenne !== 'N/A' ? getMentionFromMoyenne ( sorted . moyenne ) : 'N/A' } < / td >
{ sorted . moyenne !== 'N/A' ? getMentionFromMoyenne ( sorted . moyenne ) : 'N/A' }
< / tr >
) ) ) : ( < tr > < td colSpan = { 5 } style = { { textAlign : 'center' , padding : '20px' , fontStyle : 'italic' } } > Aucun étudiant avec la mention "{selectedMentionName}" < / td > < / tr > ) }
< / tbody >
< / table >
< / >
)
}
const renderRattrapageAdmis = ( ) => {
const results = getResultsRattrapageAdmis ( )
const selectedMentionName = returnmention ( selectedMentionId )
return (
< >
< div style = { { marginBottom : '20px' } } >
< FormControl fullWidth >
< InputLabel > Sélectionner une mention < / InputLabel >
< Select value = { selectedMentionId } onChange = { ( e ) => setSelectedMentionId ( e . target . value ) } label = "Sélectionner une mention" >
{ mention . map ( ( m ) => ( < MenuItem key = { m . id } value = { m . id } > { m . nom } < / MenuItem > ) ) }
< / Select >
< / FormControl >
< / div >
< table className = "table table-bordered table-striped text-center shadow-sm" id = "rattrapageAdmisTable" style = { { fontSize : '12px' } } >
< thead className = "table-secondary" >
< tr >
< td colSpan = { 5 } className = "py-3" style = { { backgroundColor : '#f8f9fa' } } >
< h6 style = { { margin : 0 , fontWeight : 'bold' } } > Session de Rattrapage - Étudiants ADMIS { niveau } pour la mention : { selectedMentionName } ( { results . length } étudiant { results . length > 1 ? 's' : '' } ) < / h6 >
< / td >
< / td >
< / tr >
< / tr >
) ) }
< tr style = { { backgroundColor : '#e9ecef' } } >
< th style = { { width : '10%' , fontWeight : 'bold' } } > RANG < / th >
< th style = { { width : '25%' , fontWeight : 'bold' } } > NOMS < / th >
< th style = { { width : '30%' , fontWeight : 'bold' } } > PRÉNOMS < / th >
< th style = { { width : '15%' , fontWeight : 'bold' } } > Moyenne < / th >
< th style = { { width : '20%' , fontWeight : 'bold' } } > Mention < / th >
< / tr >
< / thead >
< tbody >
{ results . length > 0 ? ( results . map ( ( item , index ) => (
< tr key = { item . id } >
< td style = { { fontWeight : 'bold' } } > { index + 1 } . < / td >
< td style = { { textAlign : 'left' , paddingLeft : '10px' , fontWeight : 'bold' } } > { item . nom } < / td >
< td style = { { textAlign : 'left' , paddingLeft : '10px' } } > { item . prenom } < / td >
< td style = { { fontWeight : 'bold' } } > { item . moyenne } < / td >
< td style = { { fontWeight : 'bold' } } > { getMentionFromMoyenne ( item . moyenne ) } < / td >
< / tr >
) ) ) : ( < tr > < td colSpan = { 5 } style = { { textAlign : 'center' , padding : '20px' , fontStyle : 'italic' } } > Aucun étudiant admis pour cette mention < / td > < / tr > ) }
< / tbody >
< / table >
{ results . length > 0 && ( < div style = { { textAlign : 'center' , marginTop : '20px' , fontSize : '14px' , fontWeight : 'bold' , padding : '10px' , backgroundColor : '#d4edda' , borderRadius : '5px' } } > Arrêt la liste des étudiants admis à { results . length } < / div > ) }
< / >
)
}
const renderRattrapageNonAdmis = ( ) => {
const results = getResultsRattrapageNonAdmis ( )
const selectedMentionName = returnmention ( selectedMentionId )
return (
< >
< div style = { { marginBottom : '20px' } } >
< FormControl fullWidth >
< InputLabel > Sélectionner une mention < / InputLabel >
< Select value = { selectedMentionId } onChange = { ( e ) => setSelectedMentionId ( e . target . value ) } label = "Sélectionner une mention" >
{ mention . map ( ( m ) => ( < MenuItem key = { m . id } value = { m . id } > { m . nom } < / MenuItem > ) ) }
< / Select >
< / FormControl >
< / div >
< table className = "table table-bordered table-striped text-center shadow-sm" id = "rattrapageNonAdmisTable" style = { { fontSize : '12px' } } >
< thead className = "table-secondary" >
< tr >
< td colSpan = { 5 } className = "py-3" style = { { backgroundColor : '#f8f9fa' } } >
< h6 style = { { margin : 0 , fontWeight : 'bold' } } > Session de Rattrapage - Étudiants NON ADMIS { niveau } pour la mention : { selectedMentionName } ( { results . length } étudiant { results . length > 1 ? 's' : '' } ) < / h6 >
< / td >
< / tr >
< tr style = { { backgroundColor : '#e9ecef' } } >
< th style = { { width : '10%' , fontWeight : 'bold' } } > RANG < / th >
< th style = { { width : '25%' , fontWeight : 'bold' } } > NOMS < / th >
< th style = { { width : '30%' , fontWeight : 'bold' } } > PRÉNOMS < / th >
< th style = { { width : '15%' , fontWeight : 'bold' } } > Moyenne < / th >
< th style = { { width : '20%' , fontWeight : 'bold' } } > Mention < / th >
< / tr >
< / thead >
< tbody >
{ results . length > 0 ? ( results . map ( ( item , index ) => (
< tr key = { item . id } >
< td style = { { fontWeight : 'bold' } } > { index + 1 } . < / td >
< td style = { { textAlign : 'left' , paddingLeft : '10px' , fontWeight : 'bold' } } > { item . nom } < / td >
< td style = { { textAlign : 'left' , paddingLeft : '10px' } } > { item . prenom } < / td >
< td style = { { fontWeight : 'bold' } } > { item . moyenne } < / td >
< td style = { { fontWeight : 'bold' } } > { getMentionFromMoyenne ( item . moyenne ) } < / td >
< / tr >
) ) ) : ( < tr > < td colSpan = { 5 } style = { { textAlign : 'center' , padding : '20px' , fontStyle : 'italic' } } > Aucun étudiant non admis pour cette mention < / td > < / tr > ) }
< / tbody >
< / tbody >
< / table >
< / table >
< / >
)
)
}
const renderResultParMatiere = ( ) => {
const renderResultParMatiere = ( ) => {
const results = getResultsByMatiere ( )
const results = getResultsByMatiere ( )
const selectedMentionName = returnmention ( selectedMentionId )
return (
return (
< >
< >
< div style = { { marginBottom : '20px' } } >
< div style = { { marginBottom : '20px' , display : 'flex' , gap : '16px' } } >
< FormControl fullWidth >
< InputLabel > Sélectionner une mention < / InputLabel >
< Select value = { selectedMentionId } onChange = { ( e ) => setSelectedMentionId ( e . target . value ) } label = "Sélectionner une mention" >
{ mention . map ( ( m ) => ( < MenuItem key = { m . id } value = { m . id } > { m . nom } < / MenuItem > ) ) }
< / Select >
< / FormControl >
< FormControl fullWidth >
< FormControl fullWidth >
< InputLabel > Sélectionner une matière < / InputLabel >
< InputLabel > Sélectionner une matière < / InputLabel >
< Select
< Select value = { selectedMatiere } onChange = { ( e ) => setSelectedMatiere ( e . target . value ) } label = "Sélectionner une matière" >
value = { selectedMatiere }
{ availableMatieres . map ( ( matiere ) => ( < MenuItem key = { matiere } value = { matiere } > { matiere } < / MenuItem > ) ) }
onChange = { ( e ) => setSelectedMatiere ( e . target . value ) }
label = "Sélectionner une matière"
>
{ availableMatieres . map ( ( matiere ) => (
< MenuItem key = { matiere } value = { matiere } >
{ matiere }
< / MenuItem >
) ) }
< / Select >
< / Select >
< / FormControl >
< / FormControl >
< / div >
< / div >
< table className = "table table-bordered table-striped text-center shadow-sm" id = "subjectTable" style = { { fontSize : '12px' } } >
< table
className = "table table-bordered table-striped text-center shadow-sm"
id = "subjectTable"
style = { { fontSize : '12px' } }
>
< thead className = "table-secondary" >
< thead className = "table-secondary" >
< tr >
< tr >
< td colSpan = { 4 } className = "py-3" style = { { backgroundColor : '#f8f9fa' } } >
< td colSpan = { 4 } className = "py-3" style = { { backgroundColor : '#f8f9fa' } } >
< h6 style = { { margin : 0 , fontWeight : 'bold' } } >
< h6 style = { { margin : 0 , fontWeight : 'bold' } } > Résultat { niveau } — Mention : { selectedMentionName } — Matière : { selectedMatiere } < / h6 >
Résultat pour la matière : { selectedMatiere }
< / h6 >
< / td >
< / td >
< / tr >
< / tr >
< tr style = { { backgroundColor : '#e9ecef' } } >
< tr style = { { backgroundColor : '#e9ecef' } } >
@ -454,46 +545,35 @@ const Resultat = () => {
const renderResultParUE = ( ) => {
const renderResultParUE = ( ) => {
const { students , matieres } = getResultsByUE ( )
const { students , matieres } = getResultsByUE ( )
const selectedMentionName = returnmention ( selectedMentionId )
return (
return (
< >
< >
< div style = { { marginBottom : '20px' } } >
< div style = { { marginBottom : '20px' , display : 'flex' , gap : '16px' } } >
< FormControl fullWidth >
< InputLabel > Sélectionner une mention < / InputLabel >
< Select value = { selectedMentionId } onChange = { ( e ) => setSelectedMentionId ( e . target . value ) } label = "Sélectionner une mention" >
{ mention . map ( ( m ) => ( < MenuItem key = { m . id } value = { m . id } > { m . nom } < / MenuItem > ) ) }
< / Select >
< / FormControl >
< FormControl fullWidth >
< FormControl fullWidth >
< InputLabel > Sélectionner une UE < / InputLabel >
< InputLabel > Sélectionner une UE < / InputLabel >
< Select
< Select value = { selectedUE } onChange = { ( e ) => setSelectedUE ( e . target . value ) } label = "Sélectionner une UE" >
value = { selectedUE }
{ availableUEs . map ( ( ue ) => ( < MenuItem key = { ue } value = { ue } > { ue } < / MenuItem > ) ) }
onChange = { ( e ) => setSelectedUE ( e . target . value ) }
label = "Sélectionner une UE"
>
{ availableUEs . map ( ( ue ) => (
< MenuItem key = { ue } value = { ue } >
{ ue }
< / MenuItem >
) ) }
< / Select >
< / Select >
< / FormControl >
< / FormControl >
< / div >
< / div >
< table className = "table table-bordered table-striped text-center shadow-sm" id = "ueTable" style = { { fontSize : '12px' } } >
< table
className = "table table-bordered table-striped text-center shadow-sm"
id = "ueTable"
style = { { fontSize : '12px' } }
>
< thead className = "table-secondary" >
< thead className = "table-secondary" >
< tr >
< tr >
< td colSpan = { 3 + matieres . length } className = "py-3" style = { { backgroundColor : '#f8f9fa' } } >
< td colSpan = { 3 + matieres . length } className = "py-3" style = { { backgroundColor : '#f8f9fa' } } >
< h6 style = { { margin : 0 , fontWeight : 'bold' } } >
< h6 style = { { margin : 0 , fontWeight : 'bold' } } > Résultat { niveau } — Mention : { selectedMentionName } — UE : { selectedUE } < / h6 >
Résultat pour l ' UE : { selectedUE }
< / h6 >
< / td >
< / td >
< / tr >
< / tr >
< tr style = { { backgroundColor : '#e9ecef' } } >
< tr style = { { backgroundColor : '#e9ecef' } } >
< th style = { { fontWeight : 'bold' } } > RANG < / th >
< th style = { { fontWeight : 'bold' } } > RANG < / th >
< th style = { { fontWeight : 'bold' } } > NOMS < / th >
< th style = { { fontWeight : 'bold' } } > NOMS < / th >
< th style = { { fontWeight : 'bold' } } > PRÉNOMS < / th >
< th style = { { fontWeight : 'bold' } } > PRÉNOMS < / th >
{ matieres . map ( ( matiere ) => (
{ matieres . map ( ( matiere ) => ( < th key = { matiere } style = { { fontWeight : 'bold' } } > { matiere } < / th > ) ) }
< th key = { matiere } style = { { fontWeight : 'bold' } } > { matiere } < / th >
) ) }
< th style = { { fontWeight : 'bold' } } > MOYENNE UE < / th >
< th style = { { fontWeight : 'bold' } } > MOYENNE UE < / th >
< / tr >
< / tr >
< / thead >
< / thead >
@ -503,11 +583,7 @@ const Resultat = () => {
< td style = { { fontWeight : 'bold' } } > { index + 1 } . < / td >
< td style = { { fontWeight : 'bold' } } > { index + 1 } . < / td >
< td style = { { textAlign : 'left' , paddingLeft : '10px' , fontWeight : 'bold' } } > { student . nom } < / td >
< td style = { { textAlign : 'left' , paddingLeft : '10px' , fontWeight : 'bold' } } > { student . nom } < / td >
< td style = { { textAlign : 'left' , paddingLeft : '10px' } } > { student . prenom } < / td >
< td style = { { textAlign : 'left' , paddingLeft : '10px' } } > { student . prenom } < / td >
{ matieres . map ( ( matiere ) => (
{ matieres . map ( ( matiere ) => ( < td key = { matiere } style = { { fontWeight : 'bold' } } > { student . matieres [ matiere ] || 'N/A' } < / td > ) ) }
< td key = { matiere } style = { { fontWeight : 'bold' } } >
{ student . matieres [ matiere ] || 'N/A' }
< / td >
) ) }
< td style = { { fontWeight : 'bold' , backgroundColor : '#fff3cd' } } > { student . moyenneUE } < / td >
< td style = { { fontWeight : 'bold' , backgroundColor : '#fff3cd' } } > { student . moyenneUE } < / td >
< / tr >
< / tr >
) ) }
) ) }
@ -522,9 +598,7 @@ const Resultat = () => {
< div className = { classeHome . header } >
< div className = { classeHome . header } >
< div className = { classe . h1style } >
< div className = { classe . h1style } >
< div className = { classeHome . blockTitle } >
< div className = { classeHome . blockTitle } >
< h1 >
< h1 > Resultat des { niveau } en { scolaire } < / h1 >
Resultat des { niveau } en { scolaire }
< / h1 >
< div style = { { display : 'flex' , gap : '10px' } } >
< div style = { { display : 'flex' , gap : '10px' } } >
< Link to = { '#' } onClick = { print } >
< Link to = { '#' } onClick = { print } >
< Button color = "warning" variant = "contained" >
< Button color = "warning" variant = "contained" >
@ -541,39 +615,26 @@ const Resultat = () => {
< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
< div className = { classeHome . boxEtudiantsCard } >
< div className = { classeHome . boxEtudiantsCard } >
< Paper
< Paper sx = { { height : 'auto' , width : '100%' , display : 'flex' , flexDirection : 'column' , padding : '2%' } } >
sx = { {
height : 'auto' ,
width : '100%' ,
display : 'flex' ,
flexDirection : 'column' ,
padding : '2%'
} }
>
{ renderHeader ( ) }
{ renderHeader ( ) }
< div style = { { marginBottom : '15px' , fontSize : '12px' } } >
< div style = { { marginBottom : '15px' , fontSize : '12px' } } >
< div > < strong > Parcours : < / strong > GC < / div >
< div > < strong > Parcours : < / strong > GC < / div >
< div > < strong > Niveau : < / strong > { niveau } < / div >
< div > < strong > Niveau : < / strong > { niveau } < / div >
< div > < strong > Année Universitaire : < / strong > { scolaire } < / div >
< div > < strong > Année Universitaire : < / strong > { scolaire } < / div >
< / div >
< / div >
< Tabs value = { tabValue } onChange = { handleTabChange } centered sx = { { marginBottom : '20px' } } >
< Tabs
< Tab label = "Session Normale" / >
value = { tabValue }
< Tab label = "Rattrapage - Admis" / >
onChange = { handleTabChange }
< Tab label = "Rattrapage - Non Admis" / >
centered
sx = { { marginBottom : '20px' } }
>
< Tab label = "Résultat Définitif" / >
< Tab label = "Par Matière" / >
< Tab label = "Par Matière" / >
< Tab label = "Par UE" / >
< Tab label = "Par UE" / >
< / Tabs >
< / Tabs >
{ tabValue === 0 && renderResultParMention ( ) }
{ tabValue === 0 && renderResultDefinitif ( ) }
{ tabValue === 1 && renderRattrapageAdmis ( ) }
{ tabValue === 1 && renderResultParMatiere ( ) }
{ tabValue === 2 && renderRattrapageNonAdmis ( ) }
{ tabValue === 2 && renderResultParUE ( ) }
{ tabValue === 3 && renderResultParMatiere ( ) }
{ tabValue === 4 && renderResultParUE ( ) }
< / Paper >
< / Paper >
< / div >
< / div >
< / div >
< / div >