diff options
Diffstat (limited to 'js/graduation-common.js')
| -rw-r--r-- | js/graduation-common.js | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/js/graduation-common.js b/js/graduation-common.js index 52c1bd4..0c28465 100644 --- a/js/graduation-common.js +++ b/js/graduation-common.js @@ -1,6 +1,18 @@ import { getSubmitDb, loadFromStudentDatabase, addEntryToStudentDatabase } from "./database.js" -const LEVEL_NAMES = ["Neuling", "Entdecker", "Pionieer"]; +import NeulingPng from "../assets/Neuling.png"; +import EntdeckerPng from "../assets/Entdecker.png"; +import NavigatorPng from "../assets/Navigator.png"; +import PioneerPng from "../assets/Pioneer.png"; + +const LEVEL_NAMES = ["Neuling", "Entdecker", "Navigator", "Pionieer"]; + +const LEVEL_IMAGES = [ + new URL(NeulingPng), + new URL(EntdeckerPng), + new URL(NavigatorPng), + new URL(PioneerPng), +]; class GraduationChange { constructor(date, change, reason, coach, context) { @@ -210,7 +222,7 @@ class Graduation { * Return the URI of the icon representing the graduation level. */ getIcon() { - return ""; + return LEVEL_IMAGES[this.level - 1]; } /** @@ -368,6 +380,7 @@ async function submitObservation(student, observation) { export { LEVEL_NAMES, + LEVEL_IMAGES, GraduationChange, Graduation, fetchGraduation, |
