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.

37 lines
583 B

3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
  1. import i18n from "./i18n.jsx";
  2. const colors = [
  3. "#015411",
  4. "#019812",
  5. "#6bca24",
  6. "#ffb200",
  7. "#ff5d00",
  8. "#b20616",
  9. "#6f0214"
  10. ];
  11. const gradeNames = [
  12. "Excellent",
  13. "Very good",
  14. "Good",
  15. "Fair",
  16. "Passable",
  17. "Insufficient",
  18. "To reject"
  19. ];
  20. const gradeValues = [6, 5, 4, 3, 2, 1, 0];
  21. export const grades = gradeNames.map((name, i) => ({
  22. label: name,
  23. color: colors[i],
  24. value: gradeValues[i]
  25. }));
  26. export const i18nGrades = () => {
  27. return gradeNames.map((name, i) => ({
  28. label: i18n.t(name),
  29. color: colors[i],
  30. value: gradeValues[i]
  31. }));
  32. };