Skip to content

Commit

Permalink
Merge pull request #86 from avantifellows/feat/add-pn-sch
Browse files Browse the repository at this point in the history
Adds Punjab Schools map to Punjab Students
  • Loading branch information
suryabulusu authored Oct 4, 2024
2 parents 644aa20 + 0827dc2 commit 04ff9c4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
9 changes: 9 additions & 0 deletions src/app/session/[type]/Steps/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,15 @@ export const setParentBatchOptions = (
apiOptions?.batch?.filter(
(item) => item.groupId === GujaratStudentsId && !item.parentId === isQuizSession
) ?? [];
} else if (authGroupSelected?.value == Group.PunjabSchools) {
const PunjabStudentsId = apiOptions.group?.find(
(item) => item.value === Group.PunjabStudents
)?.id;

filteredQuizBatchOptions =
apiOptions?.batch?.filter(
(item) => item.groupId === PunjabStudentsId && !item.parentId === isQuizSession
) ?? [];
} else {
filteredQuizBatchOptions =
apiOptions?.batch?.filter(
Expand Down
6 changes: 4 additions & 2 deletions src/types/enums.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ export enum Group {
Haryana = 'HaryanaStudents',
Himachal = 'HimachalStudents',
Maharashtra = 'MaharashtraStudents',
Punjab = 'PunjabStudents',
PunjabStudents = 'PunjabStudents',
PunjabTeachers = 'PunjabTeachers',
PunjabSchools = 'PunjabSchools',
TNSchools = 'TNSchools',
TNStudents = 'TNStudents',
Uttarakhand = 'UttarakhandStudents',
Expand All @@ -60,8 +61,9 @@ export const GroupShortName: Record<Group, string> = {
[Group.Haryana]: 'Haryana',
[Group.Himachal]: 'Himachal',
[Group.Maharashtra]: 'Maharashtra',
[Group.Punjab]: 'Punjab',
[Group.PunjabStudents]: 'Punjab',
[Group.PunjabTeachers]: 'Punjab',
[Group.PunjabSchools]: 'Punjab',
[Group.TNSchools]: 'TN',
[Group.TNStudents]: 'TN',
[Group.Uttarakhand]: 'Uttarakhand',
Expand Down

0 comments on commit 04ff9c4

Please sign in to comment.