Removed some console.logs

This commit is contained in:
Tiago Ribeiro
2024-08-30 11:25:21 +01:00
parent 2c43d48bbd
commit fef5bf44de
3 changed files with 49 additions and 55 deletions

View File

@@ -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;

View File

@@ -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
)

View File

@@ -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());