From 4db99c9b1fb06594a5002f2123a1dcc56d0a8717 Mon Sep 17 00:00:00 2001
From: Bahugunajii
Date: Fri, 15 Mar 2024 10:44:33 +0530
Subject: [PATCH 2/4] fixed bug in test cards
---
app/page.tsx | 18 +++++++++---------
app/types.ts | 3 ++-
utils/quizUtils.tsx | 3 ++-
3 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/app/page.tsx b/app/page.tsx
index 44e222d..ee60a4c 100644
--- a/app/page.tsx
+++ b/app/page.tsx
@@ -118,14 +118,14 @@ export default function Home() {
className="bg-primary text-white text-sm rounded-lg w-16 h-8 mr-4 shadow-md shadow-slate-400">START
);
+ } else {
+ return (
+
+ Starts at
+ {sessionStartTimeStr}
+
+ );
}
- } else {
- return (
-
- Starts at
- {sessionStartTimeStr}
-
- );
}
return null;
}
@@ -182,7 +182,7 @@ export default function Home() {
Subject: {data.session.meta_data.subject ?? "Science"}
- Batch: {data.session.meta_data.batch ?? "Science Batch"}
+ Name: {data.session.name}
{renderButton(data)}
@@ -217,7 +217,7 @@ export default function Home() {
Name: {data.name}
- Stream: {data.stream}
+ Format: {data.testFormat}
{renderButton(data)}
diff --git a/app/types.ts b/app/types.ts
index def5c8f..514f457 100644
--- a/app/types.ts
+++ b/app/types.ts
@@ -138,7 +138,8 @@ export interface QuizSession {
subject: string,
redirectPlatform: string,
stream: string,
- id: string
+ id: string,
+ testFormat: string
}
export interface SessionSchedule {
diff --git a/utils/quizUtils.tsx b/utils/quizUtils.tsx
index 6fe10d2..273d9a4 100644
--- a/utils/quizUtils.tsx
+++ b/utils/quizUtils.tsx
@@ -32,7 +32,8 @@ export const generateQuizLinks = async (batchData: any): Promise
redirectPlatform: sessionData.redirectPlatform,
name: sessionData.name,
stream: sessionData.stream,
- id: sessionData.id
+ id: sessionData.id,
+ testFormat: sessionData.testFormat
};
}
return null;
From b49f45628c7711951aa4c69d9035918c83ffabd4 Mon Sep 17 00:00:00 2001
From: Bahugunajii
Date: Fri, 15 Mar 2024 11:05:45 +0530
Subject: [PATCH 3/4] removed Teacher:All option from dropdown
---
app/library/class/page.tsx | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/app/library/class/page.tsx b/app/library/class/page.tsx
index 2a6cf11..81267aa 100644
--- a/app/library/class/page.tsx
+++ b/app/library/class/page.tsx
@@ -51,6 +51,9 @@ const ClassLibrary = () => {
const gradeData = await getGrades(selectedGrade);
const teacherData = await getTeachers(undefined, actualTabName);
setTeachers(teacherData);
+ if (teacherData.length > 0 && selectedTeacher === undefined) {
+ setSelectedTeacher(teacherData[0].id);
+ }
if (subjectData.length > 0) {
const subjectId = subjectData[0].id;
const gradeId = gradeData[0].id;
@@ -191,7 +194,6 @@ const ClassLibrary = () => {
value={selectedTeacher}
className="w-32 h-8 rounded-lg text-center"
>
-
{teachers.map((teacher) => (