diff --git a/src/components/AttendanceComparison.tsx b/src/components/AttendanceComparison.tsx index 4283dd32..5c4a47e4 100644 --- a/src/components/AttendanceComparison.tsx +++ b/src/components/AttendanceComparison.tsx @@ -51,7 +51,7 @@ interface AttendanceResponse { const AttendanceComparison: React.FC = () => { const { t } = useTranslation(); - const [centerType, setCenterType] = useState('Regular'); + const [centerType, setCenterType] = useState('REGULAR'); const [attendanceData, setAttendanceData] = useState>( {} ); @@ -153,11 +153,11 @@ const AttendanceComparison: React.FC = () => { onChange={handleCenterTypeChange} > } label="Regular" /> - } label="Remote" /> + } label="Remote" /> diff --git a/src/components/CohortSelectionSection.tsx b/src/components/CohortSelectionSection.tsx index 7499d28c..905ce26e 100644 --- a/src/components/CohortSelectionSection.tsx +++ b/src/components/CohortSelectionSection.tsx @@ -115,7 +115,7 @@ const CohortSelectionSection: React.FC = ({ items.forEach((item) => { const cohortType = item?.customField?.find( - (field) => field.label === 'Type of Cohort' + (field) => field.label === 'TYPE_OF_COHORT' )?.value || 'Unknown'; if (item?.cohortId && item && item?.name) { nameTypePairs.push({ diff --git a/src/pages/centers/index.tsx b/src/pages/centers/index.tsx index 73c6ac1c..8a0ef82e 100644 --- a/src/pages/centers/index.tsx +++ b/src/pages/centers/index.tsx @@ -123,7 +123,7 @@ const TeachingCenters = () => { const cohortName = child.name; const cohortId = child.cohortId; const centerTypeField = child?.customField.find( - (field: any) => field.label === 'Type of Cohort' + (field: any) => field.label === 'TYPE_OF_COHORT' ); const centerType = centerTypeField ? centerTypeField.value : ''; @@ -374,7 +374,7 @@ const TeachingCenters = () => { {/* Regular Centers */} {filteredCenters.some( (center) => - center.centerType === 'Regular' || + center.centerType === 'REGULAR' || center.centerType === '' ) && (
@@ -390,7 +390,7 @@ const TeachingCenters = () => { {filteredCenters .filter( (center) => - center.centerType === 'Regular' || + center.centerType === 'REGULAR' || center.centerType === '' ) .map((center) => ( @@ -461,7 +461,7 @@ const TeachingCenters = () => { {/* Remote Centers */} {filteredCenters.some( - (center) => center.centerType === 'Remote' + (center) => center.centerType === 'REMOTE' ) && (
{ {t('CENTERS.REMOTE_CENTERS')} {filteredCenters - .filter((center) => center.centerType === 'Remote') + .filter((center) => center.centerType === 'REMOTE') .map((center) => (