Skip to content

Commit

Permalink
Issue #PS-000 feat: Fixed lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
itsvick committed Aug 2, 2024
1 parent d0ea9f8 commit facb158
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/components/AddLeanerModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,7 @@ const AddLearnerModal: React.FC<AddLearnerModalProps> = ({
let cohortId, teacherData;
if (typeof window !== 'undefined' && window.localStorage) {
teacherData = JSON.parse(localStorage.getItem('teacherApp') || '');
cohortId =
localStorage.getItem('cohortId') ?? localStorage.getItem('classId');
cohortId = localStorage.getItem('classId');
}
const { username, password } = generateUsernameAndPassword(
teacherData?.state?.stateCode,
Expand Down Expand Up @@ -147,15 +146,15 @@ const AddLearnerModal: React.FC<AddLearnerModalProps> = ({

if (!isEditModal) {
apiBody.customFields.push({
fieldId: teacherData?.state?.blockId,
fieldId: '4aab68ae-8382-43aa-a45a-e9b239319857', //teacherData?.state?.blockId,
value: [teacherData?.state?.blockCode],
});
apiBody.customFields.push({
fieldId: teacherData?.state?.stateId,
fieldId: '6469c3ac-8c46-49d7-852a-00f9589737c5', //teacherData?.state?.stateId,
value: [teacherData?.state?.stateCode],
});
apiBody.customFields.push({
fieldId: teacherData?.state?.districtId,
fieldId: 'b61edfc6-3787-4079-86d3-37262bf23a9e', //teacherData?.state?.districtId,
value: [teacherData?.state?.districtCode],
});
console.log(apiBody);
Expand Down
12 changes: 12 additions & 0 deletions src/components/center/CreateCenterModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,18 @@ const CreateCenterModal: React.FC<CreateBlockModalProps> = ({
fieldId: fieldId,
value: formData.cohort_type,
});
cohortDetails.customFields.push({
fieldId: '6469c3ac-8c46-49d7-852a-00f9589737c5',
value: ['MH']
});
cohortDetails.customFields.push({
fieldId: 'b61edfc6-3787-4079-86d3-37262bf23a9e',
value: ['MUM']
});
cohortDetails.customFields.push({
fieldId: '4aab68ae-8382-43aa-a45a-e9b239319857',
value: ['BOR']
});
}
});
const cohortData = await createCohort(cohortDetails);
Expand Down

0 comments on commit facb158

Please sign in to comment.