Skip to content

Commit

Permalink
Merge pull request #6 from Eddasol/pr-checklist
Browse files Browse the repository at this point in the history
Add checklist to PRs
  • Loading branch information
Eddasol authored Dec 6, 2024
2 parents 6198cc7 + d348f0d commit c029b03
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
10 changes: 10 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
## Ready for review checklist:
- [ ] I have performed a self-review of my own code
- [ ] All commits run individually
- [ ] All "TODO"s, console.log or other temporary changes has been removed
- [ ] The PR has been tested locally
- [ ] Have a test been written?
- [ ] This change doesn't need a test
- [ ] Are relevant issues linked
- [ ] Is necessary, is remaining work documented in issues
- [ ] There is no remaining work on this PR that require new issues
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ export const ScheduleMissionDialog = (props: IProps): JSX.Element => {
const { setLoadingRobotMissionSet } = useMissionsContext()
const { setAlert, setListAlert } = useAlertContext()
const [isLocalizationVerificationDialogOpen, setIsLocalizationVerificationDialog] = useState<boolean>(false)
const [selectedRobot, setSelectedRobot] = useState<Robot>()
const [missionsToSchedule, setMissionsToSchedule] = useState<MissionDefinition[]>()
const filteredRobots = enabledRobots.filter(
(r) =>
Expand All @@ -65,6 +64,9 @@ export const ScheduleMissionDialog = (props: IProps): JSX.Element => {
r.status === RobotStatus.Recharging) &&
r.isarConnected
)
const [selectedRobot, setSelectedRobot] = useState<Robot | undefined>(
filteredRobots.length === 1 ? filteredRobots[0] : undefined
)

const onSelectedRobot = (selectedRobot: Robot) => {
if (filteredRobots) setSelectedRobot(selectedRobot)
Expand Down Expand Up @@ -152,7 +154,7 @@ export const ScheduleMissionDialog = (props: IProps): JSX.Element => {
)}
<StyledAutoComplete>
<Autocomplete
initialSelectedOptions={filteredRobots.length === 1 ? [filteredRobots[0]] : []}
initialSelectedOptions={selectedRobot ? [selectedRobot] : []}
dropdownHeight={200}
optionLabel={(r) => r.name + ' (' + r.model.type + ')'}
options={filteredRobots}
Expand Down

0 comments on commit c029b03

Please sign in to comment.