Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(protocol-designer): adapter support for dropdown and update img #14094

Merged
merged 1 commit into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified protocol-designer/src/images/deck_configuration.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 15 additions & 6 deletions protocol-designer/src/ui/modules/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,21 @@
.reverse()[0]
const newLocation = moveLabwareStep?.newLocation

return values(initialDeckSetup.modules).find(
(moduleOnDeck: ModuleOnDeck) =>
(newLocation != null
? newLocation
: initialDeckSetup.labware[labwareId]?.slot) === moduleOnDeck.id
)
return values(initialDeckSetup.modules).find((moduleOnDeck: ModuleOnDeck) => {
const labwareSlot = initialDeckSetup.labware[labwareId]?.slot
let location
if (newLocation != null) {
location = newLocation
} else if (
labwareSlot != null &&
initialDeckSetup.labware[labwareSlot] != null
) {
location = initialDeckSetup.labware[labwareSlot].slot

Check warning on line 57 in protocol-designer/src/ui/modules/utils.ts

View check run for this annotation

Codecov / codecov/patch

protocol-designer/src/ui/modules/utils.ts#L57

Added line #L57 was not covered by tests
} else {
location = labwareSlot
}
return location === moduleOnDeck.id
})
}
export function getModuleLabwareOptions(
initialDeckSetup: InitialDeckSetup,
Expand Down
Loading