Skip to content

Commit 77d9a09

Browse files
authored
Merge pull request #3 from steelhawks/dev
Update Form Layout
2 parents f624a3b + 1800d75 commit 77d9a09

File tree

3 files changed

+15
-70
lines changed

3 files changed

+15
-70
lines changed

screens/Scouting/Auton.jsx

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,18 @@ const Auton = ({backConfirm}) => {
2424
/>
2525
}
2626
/>,
27-
];
28-
29-
const auton_queries = [
3027
<Query
31-
title="Coral Intaken"
28+
title="Did the robot leave?"
3229
item={
33-
<CounterBox
34-
onChange={value =>
35-
setDict('autonCoralIntaken', value)
36-
}
30+
<RadioGroup
31+
buttons={['Yes', 'No']}
32+
onChange={value => setDict('robotLeft', value)}
3733
/>
3834
}
3935
/>,
36+
];
37+
38+
const auton_queries = [
4039
<Query
4140
title="Coral from Human Player"
4241
item={
@@ -48,7 +47,7 @@ const Auton = ({backConfirm}) => {
4847
}
4948
/>,
5049
<Query
51-
title="Coral From Ground"
50+
title="Coral from Ground"
5251
item={
5352
<CounterBox
5453
onChange={value =>

screens/Scouting/Auton2.jsx

Lines changed: 1 addition & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,7 @@ const Auton2 = ({backConfirm}) => {
1313
const setDict = useDictStore(state => state.setDict);
1414

1515
const auton_queries = [
16-
<Query
17-
title="Did the robot leave?"
18-
item={
19-
<RadioGroup
20-
buttons={['Yes', 'No']}
21-
onChange={value => setDict('robotLeft', value)}
22-
/>
23-
}
24-
/>,
16+
2517
<Query
2618
title="Coral Scored L4"
2719
item={
@@ -94,60 +86,13 @@ const Auton2 = ({backConfirm}) => {
9486
/>,
9587
];
9688

97-
const handleAutonIssuesQueries = (isSelected, id) => {
98-
const updatedIssues = isSelected
99-
? [...dict.autonIssues, id] // add to array if selected
100-
: dict.autonIssues.filter(issueId => issueId !== id); // remove from array if deselected
101-
102-
setDict('autonIssues', updatedIssues);
103-
};
104-
105-
const auton_issues_queries = [
106-
// NOT_MOVING, STOPPED, OUT_OF_CONTROL, Default: EMPTY
107-
<Query
108-
title="Not Moving"
109-
item={
110-
<Checkbox
111-
onPress={selected =>
112-
handleAutonIssuesQueries(selected, 'NOT_MOVING')
113-
}
114-
/>
115-
}
116-
/>,
117-
<Query
118-
title="Stopped"
119-
item={
120-
<Checkbox
121-
onPress={selected =>
122-
handleAutonIssuesQueries(selected, 'STOPPED')
123-
}
124-
/>
125-
}
126-
/>,
127-
<Query
128-
title="Out of Control"
129-
item={
130-
<Checkbox
131-
onPress={selected =>
132-
handleAutonIssuesQueries(selected, 'OUT_OF_CONTROL')
133-
}
134-
/>
135-
}
136-
/>,
137-
];
138-
13989
return (
14090
<ScrollView>
14191
<Section
14292
title={'Auton'}
14393
queries={auton_queries}
14494
style={[styles.patternSectionStyle]}
14595
/>
146-
<Section
147-
title={'Auton Issues'}
148-
queries={auton_issues_queries}
149-
style={[styles.sectionStyle]}
150-
/>
15196
</ScrollView>
15297
);
15398
};

screens/ScoutingPage.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -382,14 +382,15 @@ const ScoutingPage: React.FC<ScoutingPageProps> = ({
382382
backgroundColor: 'black',
383383
},
384384
}}>
385-
<Tab.Screen name="Auton">{AutonNavigate}</Tab.Screen>
386-
<Tab.Screen name="Auton Received">{AutonNavigate2}</Tab.Screen>
387-
<Tab.Screen name="Teleop Scoring">
388-
{TeleopNavigate}
389-
</Tab.Screen>
385+
<Tab.Screen name="Auton Received">{AutonNavigate}</Tab.Screen>
386+
<Tab.Screen name="Auton Scoring">{AutonNavigate2}</Tab.Screen>
390387
<Tab.Screen name="Teleop Received">
391388
{TeleopReceivedNavigate}
392389
</Tab.Screen>
390+
<Tab.Screen name="Teleop Scoring">
391+
{TeleopNavigate}
392+
</Tab.Screen>
393+
393394
<Tab.Screen name="Endgame">{EndgameNavigate}</Tab.Screen>
394395
</Tab.Navigator>
395396
</View>

0 commit comments

Comments
 (0)