Skip to content

Commit

Permalink
Merge pull request #829 from BIDMCDigitalPsychiatry/d-cog
Browse files Browse the repository at this point in the history
D-cog game changes
  • Loading branch information
sarithapillai8 authored Sep 3, 2024
2 parents 60b8ea4 + 453a326 commit aa83d0c
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/components/EmbeddedActivity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ const demoActivities = {
"lamp.emotion_recognition": "emotion_recognition",
"lamp.symbol_digit_substitution": "symbol_digit_substitution",
"lamp.gyroscope": "gyroscope",
"lamp.dcog": "d-cog",
}

export default function EmbeddedActivity({ participant, activity, name, onComplete, noBack, tab, ...props }) {
Expand Down
1 change: 1 addition & 0 deletions src/components/Researcher/ActivityList/Activity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export const games = [
"lamp.emotion_recognition",
"lamp.symbol_digit_substitution",
"lamp.gyroscope",
"lamp.dcog",
]

const useStyles = makeStyles((theme: Theme) =>
Expand Down
2 changes: 2 additions & 0 deletions src/components/Researcher/ActivityList/AddActivity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ export default function AddActivity({
"lamp.maze_game": `${t("Maze Game")}`,
"lamp.emotion_recognition": `${t("Emotion Recognition")}`,
"lamp.symbol_digit_substitution": `${t("Symbol-digit Substitution")}`,
"lamp.dcog": `${t("D-Cog")}`,
}

const getActivitySpec = async (id) => {
Expand All @@ -173,6 +174,7 @@ export default function AddActivity({

useEffect(() => {
;(async () => {
LAMP.ActivitySpec.create({ name: "lamp.dcog" })
const allSpecs = await LAMP.ActivitySpec.all()
let availableSpecs = allSpecs.filter((x: any) => Object.keys(activitiesObj).includes(x?.id))
let otherSpecs = allSpecs.filter((x: any) => !Object.keys(activitiesObj).includes(x?.id))
Expand Down
1 change: 1 addition & 0 deletions src/components/Researcher/ActivityList/Index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ export const games = [
"lamp.emotion_recognition",
"lamp.symbol_digit_substitution",
"lamp.gyroscope",
"lamp.dcog",
]
export default function ActivityList({
researcherId,
Expand Down
1 change: 1 addition & 0 deletions src/components/Survey.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export const games = [
"lamp.emotion_recognition",
"lamp.symbol_digit_substitution",
"lamp.gyroscope",
"lamp.dcog",
]

export default function Survey({ participant, activities, showStreak, ...props }) {
Expand Down

0 comments on commit aa83d0c

Please sign in to comment.