Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comments update #107

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 11 additions & 12 deletions src/components/NewTableComponent/StudentModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ export default function StudentModal({ open, setOpen, id }) {
}
const data = await response.json();
setStudentData(data);
console.log('Student data:', data);
} catch (error) {
console.error('Error fetching student data:', error);
} finally {
Expand Down Expand Up @@ -140,10 +139,10 @@ export default function StudentModal({ open, setOpen, id }) {
const allData = await response.json();
const filteredData = allData.filter((registration) => registration.student.id === studentId);

console.log('Filtered registration data:', filteredData);

setRegistrationData(filteredData);
} catch (error) {
console.error('Error fetching registration data:', error);

} finally {
setLoading(false);
}
Expand Down Expand Up @@ -262,13 +261,13 @@ export default function StudentModal({ open, setOpen, id }) {
<TableCell component="th" scope="row" sx={{ fontWeight: 'bold' }}>
Email
</TableCell>
<TableCell>{studentData.user ? studentData.user.email : 'NA'}</TableCell>
<TableCell>{studentData.user ? studentData.user.email : 'N/A'}</TableCell>
</TableRow>
<TableRow>
<TableCell component="th" scope="row" sx={{ fontWeight: 'bold' }}>
Contact
</TableCell>
<TableCell>{studentData.user ? studentData.user.contact : 'NA'}</TableCell>
<TableCell>{studentData.user ? studentData.user.contact : 'N/A'}</TableCell>
</TableRow>
</TableBody>
</Table>
Expand All @@ -283,24 +282,24 @@ export default function StudentModal({ open, setOpen, id }) {
<TableCell component="th" scope="row" sx={{ fontWeight: 'bold' }}>
Branch
</TableCell>
<TableCell>{studentData.program ? studentData.program.branch : 'NA'}</TableCell>
<TableCell>{studentData.program ? studentData.program.branch : 'N/A'}</TableCell>
</TableRow>
<TableRow>
<TableCell component="th" scope="row" sx={{ fontWeight: 'bold' }}>
Course
</TableCell><TableCell>{studentData.program ? studentData.program.course : 'NA'}</TableCell>
</TableCell><TableCell>{studentData.program ? studentData.program.course : 'N/A'}</TableCell>
</TableRow>
<TableRow>
<TableCell component="th" scope="row" sx={{ fontWeight: 'bold' }}>
Year
</TableCell>
<TableCell>{studentData.program ? studentData.program.year : 'NA'}</TableCell>
<TableCell>{studentData.program ? studentData.program.year : 'N/A'}</TableCell>
</TableRow>
<TableRow>
<TableCell component="th" scope="row" sx={{ fontWeight: 'bold' }}>
Department
</TableCell>
<TableCell>{studentData.program ? studentData.program.department : 'NA'}</TableCell>
<TableCell>{studentData.program ? studentData.program.department : 'N/A'}</TableCell>
</TableRow>
</TableBody>
</Table>
Expand Down Expand Up @@ -334,7 +333,7 @@ export default function StudentModal({ open, setOpen, id }) {
</TableCell>
<TableCell>{resume.verified.toString()}</TableCell>
</TableRow>
)) : 'NA'}
)) : 'N/A'}
</TableBody>
</Table>
</TableContainer>
Expand All @@ -355,7 +354,7 @@ export default function StudentModal({ open, setOpen, id }) {
<TableCell>{penalty.penalty}</TableCell>
<TableCell>{penalty.reason}</TableCell>
</TableRow>
)) : 'NA'}
)) : 'N/A'}
</TableBody>
</Table>
</TableContainer>
Expand Down Expand Up @@ -390,7 +389,7 @@ export default function StudentModal({ open, setOpen, id }) {
</Button>
</TableCell>
</TableRow>
)) : 'NA'}
)) : 'N/A'}
</TableBody>
</Table>
</TableContainer>
Expand Down
1 change: 0 additions & 1 deletion src/helpers/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,6 @@ export const fetchSeasonData = async (
}
);
const json = await res.json();
console.log(json);
return json;
};

Expand Down
Loading