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.
46 lines
615 B
46 lines
615 B
4 years ago
|
import i18n from './i18n.jsx';
|
||
|
|
||
4 years ago
|
const colors = [
|
||
4 years ago
|
'#015411',
|
||
4 years ago
|
'#019812',
|
||
|
'#6bca24',
|
||
|
'#ffb200',
|
||
|
'#ff5d00',
|
||
|
'#b20616',
|
||
|
'#6f0214',
|
||
4 years ago
|
];
|
||
4 years ago
|
|
||
|
const gradeNames = [
|
||
4 years ago
|
'Excellent',
|
||
4 years ago
|
'Very good',
|
||
|
'Good',
|
||
|
'Fair',
|
||
|
'Passable',
|
||
|
'Insufficient',
|
||
|
'To reject',
|
||
|
];
|
||
|
|
||
|
const gradeValues = [
|
||
|
6,
|
||
|
5,
|
||
|
4,
|
||
|
3,
|
||
|
2,
|
||
|
1,
|
||
|
0
|
||
4 years ago
|
];
|
||
|
|
||
|
export const grades = gradeNames.map((name, i) => ({
|
||
|
label: name,
|
||
4 years ago
|
color: colors[i],
|
||
4 years ago
|
value: gradeValues[i]
|
||
4 years ago
|
}));
|
||
4 years ago
|
|
||
|
export const i18nGrades = () => {
|
||
|
return gradeNames.map((name, i) => ({
|
||
|
label: i18n.t(name),
|
||
4 years ago
|
color: colors[i],
|
||
4 years ago
|
value: gradeValues[i]
|
||
4 years ago
|
}));
|
||
4 years ago
|
};
|