Added passportid to the table ; removed gender column from table
This commit is contained in:
@@ -250,7 +250,19 @@ const GroupTestReport = ({
|
|||||||
{showLevel && <Text style={customStyles.tableCell}>Level</Text>}
|
{showLevel && <Text style={customStyles.tableCell}>Level</Text>}
|
||||||
</View>
|
</View>
|
||||||
{studentsData.map(
|
{studentsData.map(
|
||||||
({ id, name, email, gender, date, result, level }, index) => (
|
(
|
||||||
|
{
|
||||||
|
id,
|
||||||
|
name,
|
||||||
|
email,
|
||||||
|
gender,
|
||||||
|
date,
|
||||||
|
result,
|
||||||
|
level,
|
||||||
|
passportId: studentPassportId,
|
||||||
|
},
|
||||||
|
index
|
||||||
|
) => (
|
||||||
<View
|
<View
|
||||||
style={[
|
style={[
|
||||||
customStyles.tableRow,
|
customStyles.tableRow,
|
||||||
@@ -269,9 +281,8 @@ const GroupTestReport = ({
|
|||||||
</Text>
|
</Text>
|
||||||
<Text style={customStyles.tableCell}>{name}</Text>
|
<Text style={customStyles.tableCell}>{name}</Text>
|
||||||
<Text style={customStyles.tableCell}>{email}</Text>
|
<Text style={customStyles.tableCell}>{email}</Text>
|
||||||
<Text style={[customStyles.tableCell, { maxWidth: "48px" }]}>
|
<Text style={customStyles.tableCell}>{studentPassportId}</Text>
|
||||||
{gender}
|
|
||||||
</Text>
|
|
||||||
<Text style={[customStyles.tableCell, { maxWidth: "64px" }]}>
|
<Text style={[customStyles.tableCell, { maxWidth: "64px" }]}>
|
||||||
{date}
|
{date}
|
||||||
</Text>
|
</Text>
|
||||||
|
|||||||
@@ -19,4 +19,5 @@ export interface StudentData {
|
|||||||
result: string;
|
result: string;
|
||||||
level?: string;
|
level?: string;
|
||||||
bandScore: number;
|
bandScore: number;
|
||||||
|
passportId?: string;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -235,6 +235,8 @@ async function post(req: NextApiRequest, res: NextApiResponse) {
|
|||||||
|
|
||||||
const result = exams.length === 0 ? "N/A" : `${correct}/${total}`;
|
const result = exams.length === 0 ? "N/A" : `${correct}/${total}`;
|
||||||
|
|
||||||
|
const userDemographicInformation = user?.demographicInformation as DemographicInformation;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
id,
|
id,
|
||||||
name: user?.name || "N/A",
|
name: user?.name || "N/A",
|
||||||
@@ -244,6 +246,7 @@ async function post(req: NextApiRequest, res: NextApiResponse) {
|
|||||||
result,
|
result,
|
||||||
level: showLevel ? getLevelScoreForUserExams(bandScore) : undefined,
|
level: showLevel ? getLevelScoreForUserExams(bandScore) : undefined,
|
||||||
bandScore,
|
bandScore,
|
||||||
|
passportId: userDemographicInformation?.passport_id || ""
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user