Removed some console.logs
This commit is contained in:
@@ -198,7 +198,6 @@ const StudentPerformanceList = ({items, stats, users, groups}: {items: StudentPe
|
||||
];
|
||||
|
||||
const filterUsers = (data: StudentPerformanceItem[]) => {
|
||||
console.log(data, selectedCorporate);
|
||||
const filterByCorporate = (item: StudentPerformanceItem) => item.corporate?.id === selectedCorporate?.id;
|
||||
const filterByGroup = (item: StudentPerformanceItem) => item.group?.id === selectedGroup?.id;
|
||||
|
||||
|
||||
@@ -30,7 +30,6 @@ export default function CorporateGradingSystem({user, defaultSteps, mutate}: {us
|
||||
if (areStepsOverlapped(steps)) return toast.error("There seems to be an overlap in one of your steps.");
|
||||
if (
|
||||
steps.reduce((acc, curr) => {
|
||||
console.log(acc - (curr.max - curr.min + 1));
|
||||
return acc - (curr.max - curr.min + 1);
|
||||
}, 100) > 0
|
||||
)
|
||||
|
||||
@@ -37,17 +37,14 @@ async function GET(req: NextApiRequest, res: NextApiResponse) {
|
||||
corporateId: id,
|
||||
assigners,
|
||||
};
|
||||
})
|
||||
}),
|
||||
);
|
||||
|
||||
const assignments = await Promise.all(assigners.map(async (data) => {
|
||||
const assignments = await Promise.all(
|
||||
assigners.map(async (data) => {
|
||||
try {
|
||||
const assigners = [...new Set([...data.assigners, data.corporateId])];
|
||||
const assignments = await getAssignmentsByAssigners(
|
||||
assigners,
|
||||
startDateParsed,
|
||||
endDateParsed
|
||||
);
|
||||
const assignments = await getAssignmentsByAssigners(assigners, startDateParsed, endDateParsed);
|
||||
return assignments.map((assignment) => ({
|
||||
...assignment,
|
||||
corporateId: data.corporateId,
|
||||
@@ -56,9 +53,8 @@ async function GET(req: NextApiRequest, res: NextApiResponse) {
|
||||
console.error(err);
|
||||
return [];
|
||||
}
|
||||
}));
|
||||
|
||||
console.log(assignments);
|
||||
}),
|
||||
);
|
||||
|
||||
// const assignments = await getAssignmentsByAssigners(assignmentList, startDateParsed, endDateParsed);
|
||||
res.status(200).json(assignments.flat());
|
||||
|
||||
Reference in New Issue
Block a user