Skip to content

Commit 5853d2e

Browse files
authored
Merge pull request CoBrALab#122 from david-roper/change-putbacks
Change putbacks related questions in the motor task form
2 parents 6d45bbe + 3ef5758 commit 5853d2e

File tree

1 file changed

+19
-6
lines changed
  • public/forms/CoBrALab-Mouse-Motor-Task-Form

1 file changed

+19
-6
lines changed

public/forms/CoBrALab-Mouse-Motor-Task-Form/index.ts

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,15 @@ export default defineInstrument({
7373

7474
rotarodPutbacks: createDependentField({
7575
kind: "number",
76-
variant: "input",
77-
label: "Times put back on rotarod"
76+
variant: "select",
77+
label: "Additional times put back on rotarod",
78+
options: {
79+
0: 'None',
80+
1: 'One time',
81+
2: 'Two times',
82+
3: 'Three times'
83+
}
84+
7885
}, (type) => type === "Rotarod"),
7986

8087

@@ -87,8 +94,14 @@ export default defineInstrument({
8794

8895
wirehangPutbacks: createDependentField({
8996
kind: "number",
90-
variant: "input",
91-
label: "Times put back on wire"
97+
variant: "select",
98+
label: "Additional times put back on wire",
99+
options: {
100+
0: 'None',
101+
1: 'One time',
102+
2: 'Two times',
103+
3: 'Three times'
104+
}
92105
},(type) => type === "Wire hang"),
93106

94107
poleTestDuration: createDependentField({
@@ -229,10 +242,10 @@ export default defineInstrument({
229242
rotarodTotalMiceNumber: z.number().min(1).max(4).optional(),
230243
rotarodDuration: z.number().min(0).optional(),
231244
rotarodSlotPosition: z.enum(["Left most", "Middle left", "Middle right", "Right most"]).optional(),
232-
rotarodPutbacks: z.number().int().min(0).optional(),
245+
rotarodPutbacks: z.union([z.literal(0),z.literal(1), z.literal(2), z.literal(3)]).optional(),
233246
rotarodWirehangGripForceFailure: z.boolean().optional(),
234247
wirehangDuration: z.number().min(0).optional(),
235-
wirehangPutbacks: z.number().min(0).int().optional(),
248+
wirehangPutbacks: z.union([z.literal(0),z.literal(1), z.literal(2), z.literal(3)]).optional(),
236249
poleTestDuration: z.number().min(0).optional(),
237250
poleTestResultLevel: z.enum(["Pass", "Marginal failure", "Failure"]).optional(),
238251
poleTestMarginalFailureReason: z.string().optional(),

0 commit comments

Comments
 (0)