Skip to content

Commit

Permalink
Remove duplicate type "StudentScheinCriteriaSummaryMap"
Browse files Browse the repository at this point in the history
  • Loading branch information
Dudrie committed Feb 11, 2020
1 parent 5317b7a commit 50da233
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
6 changes: 3 additions & 3 deletions client/src/hooks/fetching/Tutorial.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { ScheincriteriaSummaryByStudents } from 'shared/dist/model/ScheinCriteria';
import { Student } from 'shared/dist/model/Student';
import { SubstituteDTO, Tutorial, TutorialDTO } from 'shared/dist/model/Tutorial';
import { TutorInfo, User } from 'shared/dist/model/User';
import { sortByName } from 'shared/dist/util/helpers';
import {
StudentByTutorialSlotSummaryMap,
StudentScheinCriteriaSummaryMap,
TutorialWithFetchedCorrectors,
TutorialWithFetchedStudents,
TutorialWithFetchedTutor,
Expand Down Expand Up @@ -192,8 +192,8 @@ export async function getStudentsOfTutorial(id: string): Promise<Student[]> {

export async function getScheinCriteriaSummariesOfAllStudentsOfTutorial(
id: string
): Promise<StudentScheinCriteriaSummaryMap> {
const response = await axios.get<StudentScheinCriteriaSummaryMap>(
): Promise<ScheincriteriaSummaryByStudents> {
const response = await axios.get<ScheincriteriaSummaryByStudents>(
`scheincriteria/tutorial/${id}`
);

Expand Down
4 changes: 0 additions & 4 deletions client/src/typings/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ export interface HasPoints extends HasId {
points: PointMapDTO;
}

export interface StudentScheinCriteriaSummaryMap {
[id: string]: ScheinCriteriaSummary;
}

export interface StudentByTutorialSlotSummaryMap {
[tutorialSlot: string]: ScheinCriteriaSummary[];
}
8 changes: 3 additions & 5 deletions client/src/view/dashboard/Dashboard.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
import React, { useEffect, useState } from 'react';
import { Role } from 'shared/dist/model/Role';
import { ScheincriteriaSummaryByStudents } from 'shared/dist/model/ScheinCriteria';
import { Tutorial } from 'shared/dist/model/Tutorial';
import { LoggedInUser } from 'shared/dist/model/User';
import LoadingSpinner from '../../components/loading/LoadingSpinner';
import { getTutorial } from '../../hooks/fetching/Tutorial';
import { useAxios } from '../../hooks/FetchingService';
import { useLogin } from '../../hooks/LoginService';
import {
StudentByTutorialSlotSummaryMap,
StudentScheinCriteriaSummaryMap,
} from '../../typings/types';
import { StudentByTutorialSlotSummaryMap } from '../../typings/types';
import AdminStatsCard from './components/AdminStatsCard';
import AllTutorialStatistics from './components/AllTutorialStatistics';
import TutorialStatistics from './components/TutorialStatistics';

export interface TutorialSummaryInfo {
tutorial: Tutorial;
studentInfos: StudentScheinCriteriaSummaryMap;
studentInfos: ScheincriteriaSummaryByStudents;
}

function isAdmin(userData: LoggedInUser | undefined): boolean {
Expand Down

0 comments on commit 50da233

Please sign in to comment.