added skill translation. Skills now pull from the actual resource object they are representing

This commit is contained in:
Brandon Egger
2023-03-16 22:02:34 -05:00
parent 1ab77619ab
commit 53237fc22e
2 changed files with 37 additions and 5 deletions

View File

@ -1,4 +1,4 @@
import { type Platform } from "@prisma/client";
import { Skill, type Platform } from "@prisma/client";
/**
* Takes a platform enum and translates it to readable form.
@ -18,4 +18,34 @@ export const translateEnumPlatform = (value: Platform) => {
return "Website"
}
}
}
/**
* Takes a skill enum value and translates it to human text
* @param value
*/
export const translateEnumSkill = (value: Skill) => {
switch(value) {
case "ENVIRONMENT": {
return "not done";
}
case "BACKGROUND": {
return "not done";
}
case "DISCOURSE": {
return "not done";
}
case "MUSIC": {
return "Music"
}
case "PHONEMES": {
return "not done";
}
case "SENTENCES": {
return "Sentences"
}
case "WORDS": {
return "Word Recognition"
}
}
}