Skip to content

Commit

Permalink
Merge pull request #106 from samnotfound404/main
Browse files Browse the repository at this point in the history
Debug
  • Loading branch information
samnotfound404 authored Jul 10, 2024
2 parents 9f5c8e0 + c7364ab commit 68c4483
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions src/components/NewTableComponent/StudentModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ export default function StudentModal({ open, setOpen, id }) {
<TableCell component="th" scope="row" sx={{ fontWeight: 'bold' }}>
Name
</TableCell>
<TableCell>{studentData.user ? studentData.user.Name : 'N/A'}</TableCell>
<TableCell>{studentData.user ? studentData.user.name : 'N/A'}</TableCell>
</TableRow>
<TableRow>
<TableCell component="th" scope="row" sx={{ fontWeight: 'bold' }}>
Expand All @@ -283,24 +283,24 @@ export default function StudentModal({ open, setOpen, id }) {
<TableCell component="th" scope="row" sx={{ fontWeight: 'bold' }}>
Branch
</TableCell>
<TableCell>{studentData.program ? studentData.user.branch : 'NA'}</TableCell>
<TableCell>{studentData.program ? studentData.program.branch : 'NA'}</TableCell>
</TableRow>
<TableRow>
<TableCell component="th" scope="row" sx={{ fontWeight: 'bold' }}>
Course
</TableCell><TableCell>{studentData.program ? studentData.user.course : 'NA'}</TableCell>
</TableCell><TableCell>{studentData.program ? studentData.program.course : 'NA'}</TableCell>
</TableRow>
<TableRow>
<TableCell component="th" scope="row" sx={{ fontWeight: 'bold' }}>
Year
</TableCell>
<TableCell>{studentData.program ? studentData.user.year : 'NA'}</TableCell>
<TableCell>{studentData.program ? studentData.program.year : 'NA'}</TableCell>
</TableRow>
<TableRow>
<TableCell component="th" scope="row" sx={{ fontWeight: 'bold' }}>
Department
</TableCell>
<TableCell>{studentData.program ? studentData.user.department : 'NA'}</TableCell>
<TableCell>{studentData.program ? studentData.program.department : 'NA'}</TableCell>
</TableRow>
</TableBody>
</Table>
Expand Down Expand Up @@ -334,7 +334,7 @@ export default function StudentModal({ open, setOpen, id }) {
</TableCell>
<TableCell>{resume.verified.toString()}</TableCell>
</TableRow>
)) : 'NAA'}
)) : 'NA'}
</TableBody>
</Table>
</TableContainer>
Expand All @@ -345,19 +345,17 @@ export default function StudentModal({ open, setOpen, id }) {
<Table>
<TableHead>
<TableRow>
<TableCell sx={{ fontWeight: 'bold' }}>ID</TableCell>
<TableCell sx={{ fontWeight: 'bold' }}>Penalty</TableCell>
<TableCell sx={{ fontWeight: 'bold' }}>Reason</TableCell>
</TableRow>
</TableHead>
<TableBody>
{studentData.penalties ? studentData.penalties.map((penalty) => (
<TableRow key={penalty.id}>
<TableCell>{penalty.id}</TableCell>
<TableCell>{penalty.penalty}</TableCell>
<TableCell>{penalty.reason}</TableCell>
</TableRow>
)) : 'NAA'}
)) : 'NA'}
</TableBody>
</Table>
</TableContainer>
Expand Down

0 comments on commit 68c4483

Please sign in to comment.