Solved some problems with the excel of master statistical
This commit is contained in:
@@ -75,7 +75,7 @@ const MasterStatistical = (props: Props) => {
|
||||
assignments.reduce((accmA: TableData[], a: AssignmentWithCorporateId) => {
|
||||
const userResults = a.assignees.map((assignee) => {
|
||||
const userData = users.find((u) => u.id === assignee);
|
||||
const userStats = !!userData ? a.results.find((r) => r.user === assignee)?.stats || [] : [];
|
||||
const userStats = a.results.find((r) => r.user === assignee)?.stats || [];
|
||||
const corporate = getUserName(users.find((u) => u.id === a.assigner));
|
||||
const commonData = {
|
||||
user: userData,
|
||||
@@ -109,8 +109,6 @@ const MasterStatistical = (props: Props) => {
|
||||
[assignments, users],
|
||||
);
|
||||
|
||||
useEffect(() => console.log(assignments), [assignments]);
|
||||
|
||||
const getCorporateScores = (corporateId: string): UserCount => {
|
||||
const corporateAssignmentsUsers = assignments.filter((a) => a.corporateId === corporateId).reduce((acc, a) => acc + a.assignees.length, 0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user