Skip to content

Commit

Permalink
Merge pull request #108 from suvarnakale/release-1.0.0
Browse files Browse the repository at this point in the history
Issue #PS-1626 feat: event list for month view
  • Loading branch information
itsvick authored Aug 8, 2024
2 parents b186450 + e66688a commit 704a709
Show file tree
Hide file tree
Showing 5 changed files with 245 additions and 149 deletions.
4 changes: 2 additions & 2 deletions public/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@
"ENTER_NUMBER": "Please enter a number",
"ENTER_CHARACTER": "Please enter at least one character",
"CONTACT_NUMBER": "Contact Number",
"ENROLLMENT_NUMBER":"Enrollment Number",
"ENROLLMENT_NUMBER": "Enrollment Number",
"SELECT_OPTION": "Select Option"
},

Expand Down Expand Up @@ -336,7 +336,7 @@
"REMOVE_THIS_SESSION": "Remove this session",
"PLANNED_SESSION": "Planned Session",
"FIXES_SUBJECTS": "For fixed subjects in the timetable",
"EXTRA_SESSION": "Extra Session",
"EXTRA_SESSION": "Extra Sessions",
"DOUBT_CLEARING": "For doubt clearing, webinars, etc",
"TOPIC": "Topic",
"SUBTOPIC": "Sub Topic",
Expand Down
120 changes: 0 additions & 120 deletions src/pages/center-session.tsx

This file was deleted.

14 changes: 3 additions & 11 deletions src/pages/centers/[cohortId].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,7 @@ const TeachingCenterDetails = () => {
setOpenSchedule(true);
};

const handleSchedule = () => {
console.log('API Call');
};
const handleSchedule = () => {};

const handleOpen = () => setOpen(true);
const handleClose = () => {
Expand All @@ -143,7 +141,6 @@ const TeachingCenterDetails = () => {
useEffect(() => {
const getCohortData = async () => {
const response = await getCohortDetails(cohortId);
console.log(response);

let cohortData = null;

Expand Down Expand Up @@ -199,7 +196,6 @@ const TeachingCenterDetails = () => {
setSessions(sessionArray);
} catch (error) {
setSessions([]);
showToastMessage(t('COMMON.NO_SESSIONS_SCHEDULED'), 'error');
}
};

Expand All @@ -224,22 +220,18 @@ const TeachingCenterDetails = () => {
status: ['live'],
};
const response = await getEventList({ limit, offset, filters });
console.log(response);
let extraSessionArray: any[] = [];
if (response?.events.length > 0) {
response?.events.forEach((event: any) => {
if (!event.isRecurring) {
console.log(event);
extraSessionArray.push(event);
}
});
}
setExtraSessions(extraSessionArray);
} catch (error) {
setExtraSessions([]);
showToastMessage(t('COMMON.NO_SESSIONS_SCHEDULED'), 'error');
}
console.log(sessions);
};

getExtraSessionsData();
Expand Down Expand Up @@ -286,7 +278,7 @@ const TeachingCenterDetails = () => {

const viewAttendanceHistory = () => {
if (classId !== 'all') {
router.push('/center-session');
router.push('/eventMonthView');
ReactGA.event('month-name-clicked', { selectedCohortID: classId });
}
};
Expand Down Expand Up @@ -536,7 +528,7 @@ const TeachingCenterDetails = () => {
opacity: classId === 'all' ? 0.5 : 1,
alignItems: 'center',
}}
// onClick={viewAttendanceHistory}
onClick={viewAttendanceHistory}
>
<Typography marginBottom={'0'} style={{ fontWeight: '500' }}>
{getMonthName()}
Expand Down
Loading

0 comments on commit 704a709

Please sign in to comment.