You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mvfront-react/services/grades.js

41 lines
584 B

const colors = [
"#F2F0FF",
"#C23D13",
"#C27C13",
"#C2B113",
"#D3D715",
"#A0CF1C",
"#3A9918"
];
const gradeNames = [
"To reject",
"Insufficient",
"Passable",
"Fair",
"Good",
"Very good",
"Excellent"
];
const gradeClass = [
"to-reject",
"insufficient",
"passable",
"fair",
"good",
"very-good",
"excellent"
];
const gradeValues = [0, 1, 2, 3, 4, 5, 6, 7];
export const translateGrades = (t) => {
return gradeNames.map((name, i) => ({
label: t(name),
color: colors[i],
value: gradeValues[i],
class: gradeClass[i]
}));
};