Skip to content

Commit

Permalink
adds guj schools
Browse files Browse the repository at this point in the history
  • Loading branch information
suryabulusu committed Sep 13, 2024
1 parent 6aa74e2 commit dcc23f1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
9 changes: 8 additions & 1 deletion src/app/session/[type]/Steps/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const setGroupPreset = (value: string, form: UseFormReturn, apiOptions: A
break;

case Group.Delhi:
case Group.Gujarat:
case Group.GujaratStudents:
case Group.Himachal:
case Group.FeedingIndia:
newDefaultData = {
Expand Down Expand Up @@ -120,6 +120,13 @@ export const setParentBatchOptions = (
apiOptions?.batch?.filter(
(item) => item.groupId === TNStudentsId && !item.parentId === isQuizSession
) ?? [];
} else if (authGroupSelected?.value == Group.GujaratSchools) {
const GujaratStudentsId = apiOptions.group?.find((item) => item.value === Group.GujaratStudents)?.id;

filteredQuizBatchOptions =
apiOptions?.batch?.filter(
(item) => item.groupId === GujaratStudentsId && !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 @@ -35,7 +35,8 @@ export enum Group {
EnableSchools = 'EnableSchools',
Enable = 'EnableStudents',
FeedingIndia = 'FeedingIndiaStudents',
Gujarat = 'GujaratStudents',
GujaratStudents = 'GujaratStudents',
GujaratSchools = 'GujaratSchools',
Haryana = 'HaryanaStudents',
Himachal = 'HimachalStudents',
Maharashtra = 'MaharashtraStudents',
Expand All @@ -54,7 +55,8 @@ export const GroupShortName: Record<Group, string> = {
[Group.EnableSchools]: 'Enable',
[Group.Enable]: 'Enable',
[Group.FeedingIndia]: 'Feeding',
[Group.Gujarat]: 'Gujarat',
[Group.GujaratStudents]: 'Gujarat',
[Group.GujaratSchools]: 'Gujarat',
[Group.Haryana]: 'Haryana',
[Group.Himachal]: 'Himachal',
[Group.Maharashtra]: 'Maharashtra',
Expand Down

0 comments on commit dcc23f1

Please sign in to comment.