added skill translation. Skills now pull from the actual resource object they are representing
This commit is contained in:
		| @@ -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" | ||||
|         } | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user
	 Brandon Egger
					Brandon Egger