Skip to content

Commit baa949f

Browse files
committed
CourseFilter: количество и сортировкастудентов
1 parent 2f415d8 commit baa949f

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

HwProj.APIGateway/HwProj.APIGateway.API/Controllers/CoursesController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ public async Task<IActionResult> GetMentorWorkspace(long courseId, string mentor
269269
var workspace = new WorkspaceViewModel
270270
{
271271
Homeworks = mentorCourseView.Value.Homeworks,
272-
Students = students
272+
Students = students.OrderBy(x => x.Surname).ThenBy(x => x.Name).ToArray(),
273273
};
274274
return Ok(workspace);
275275
}

hwproj.front/src/components/Courses/CourseFilter.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {Autocomplete} from "@mui/material";
55
import TextField from "@material-ui/core/TextField";
66
import ApiSingleton from "../../api/ApiSingleton";
77
import ErrorsHandler from "../Utils/ErrorsHandler";
8-
import { DotLottieReact } from '@lottiefiles/dotlottie-react';
8+
import {DotLottieReact} from '@lottiefiles/dotlottie-react';
99
import Button from "@material-ui/core/Button";
1010

1111
interface ICourseFilterProps {
@@ -158,7 +158,7 @@ const CourseFilter: FC<ICourseFilterProps> = (props) => {
158158
<TextField
159159
{...params}
160160
variant="outlined"
161-
label={state.selectedStudents.length === 0 ? "" : "Студенты"}
161+
label={state.selectedStudents.length === 0 ? "" : `Студенты (${state.selectedStudents.length})`}
162162
placeholder={state.selectedStudents.length === 0 ? "Все студенты" : ""}
163163
/>)}
164164
noOptionsText={'На курсе больше нет студентов'}

0 commit comments

Comments
 (0)