Skip to content

Commit

Permalink
Merge pull request #181 from suvarnakale/release-1.0.0
Browse files Browse the repository at this point in the history
Issue #PS-0000 chore: request body changes for event list API for mytimetable
  • Loading branch information
itsvick authored Aug 23, 2024
2 parents 18cb0f2 + d09b1ad commit 737a276
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions src/pages/dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import {
} from '../services/AttendanceService';
import {
formatSelectedDate,
getAfterDate,
getBeforeDate,
getTodayDate,
shortDateFormat,
toPascalCase,
Expand Down Expand Up @@ -372,7 +374,6 @@ const Dashboard: React.FC<DashboardProps> = () => {
},
};
telemetryFactory.interact(telemetryInteract);

};

const getMonthName = (dateString: string) => {
Expand Down Expand Up @@ -507,10 +508,15 @@ const Dashboard: React.FC<DashboardProps> = () => {
useEffect(() => {
const getSessionsData = async () => {
try {
const afterDate = getAfterDate(timeTableDate);
const beforeDate = getBeforeDate(timeTableDate);
const limit = 0;
const offset = 0;
const filters = {
date: timeTableDate,
date: {
after: afterDate,
before: beforeDate,
},
cohortId: classId,
status: ['live'],
};
Expand Down Expand Up @@ -541,11 +547,17 @@ const Dashboard: React.FC<DashboardProps> = () => {
date.setDate(date.getDate() + modifyAttendanceLimit)
);
const endDate = shortDateFormat(lastDate);
const afterDate = getAfterDate(startDate);
const beforeDate = getBeforeDate(endDate);
const limit = 0;
const offset = 0;
const filters = {
startDate: startDate,
endDate: endDate,
startDate: {
after: afterDate,
},
endDate: {
before: beforeDate,
},
cohortId: classId,
status: ['live'],
};
Expand Down

0 comments on commit 737a276

Please sign in to comment.