Skip to content

Commit 7bc1dc8

Browse files
committed
Исправление для цвета решения
1 parent ff58ee5 commit 7bc1dc8

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

hwproj.front/src/services/StudentStatsUtils.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,9 @@ export default class StudentStatsUtils {
4141
solutionsDescription = `${lastSolution.rating}/${taskMaxRating} ${Utils.pluralizeHelper(["балл", "балла", "баллов"], taskMaxRating)}`
4242
else solutionsDescription = "Последняя оценка — " + `${lastRatedSolution.rating}/${taskMaxRating} ${Utils.pluralizeHelper(["балл", "балла", "баллов"], taskMaxRating)}\nНовое решение ожидает проверки`
4343

44-
let color: string
45-
if (disabled)
46-
color = grey[300]
47-
else if (lastRatedSolution == undefined)
48-
color = "#ffffff"
49-
else
50-
color = StudentStatsUtils.getCellBackgroundColor(lastRatedSolution.state, lastRatedSolution.rating, taskMaxRating, isFirstUnratedTry)
44+
const color = disabled
45+
? grey[300]
46+
: StudentStatsUtils.getCellBackgroundColor(lastRatedSolution.state, lastRatedSolution.rating, taskMaxRating, isFirstUnratedTry)
5147

5248
return {
5349
lastRatedSolution: lastRatedSolution,

0 commit comments

Comments
 (0)