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

fix(app): render protocol setup labware addressableAreaName location #14013

Merged
merged 3 commits into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,18 @@
const { createLiveCommand } = useCreateLiveCommandMutation()
const [isLatchLoading, setIsLatchLoading] = React.useState<boolean>(false)
const [isLatchClosed, setIsLatchClosed] = React.useState<boolean>(false)
let slotInfo: string | null =
initialLocation !== 'offDeck' && 'slotName' in initialLocation
? initialLocation.slotName
: null

let slotInfo: string | null = null

if (initialLocation !== 'offDeck' && 'slotName' in initialLocation) {
slotInfo = initialLocation.slotName

Check warning on line 100 in app/src/organisms/Devices/ProtocolRun/SetupLabware/LabwareListItem.tsx

View check run for this annotation

Codecov / codecov/patch

app/src/organisms/Devices/ProtocolRun/SetupLabware/LabwareListItem.tsx#L100

Added line #L100 was not covered by tests
} else if (
initialLocation !== 'offDeck' &&
'addressableAreaName' in initialLocation
) {
slotInfo = initialLocation.addressableAreaName

Check warning on line 105 in app/src/organisms/Devices/ProtocolRun/SetupLabware/LabwareListItem.tsx

View check run for this annotation

Codecov / codecov/patch

app/src/organisms/Devices/ProtocolRun/SetupLabware/LabwareListItem.tsx#L105

Added line #L105 was not covered by tests
}

let moduleDisplayName: string | null = null
let extraAttentionText: JSX.Element | null = null
let isCorrectHeaterShakerAttached: boolean = false
Expand Down
3 changes: 3 additions & 0 deletions app/src/organisms/ProtocolSetupLabware/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,9 @@
} else if ('slotName' in initialLocation) {
slotName = initialLocation.slotName
location = <LocationIcon slotName={initialLocation.slotName} />
} else if ('addressableAreaName' in initialLocation) {
slotName = initialLocation.addressableAreaName
location = <LocationIcon slotName={initialLocation.addressableAreaName} />

Check warning on line 495 in app/src/organisms/ProtocolSetupLabware/index.tsx

View check run for this annotation

Codecov / codecov/patch

app/src/organisms/ProtocolSetupLabware/index.tsx#L494-L495

Added lines #L494 - L495 were not covered by tests
} else if (matchedModuleType != null && matchedModule?.slotName != null) {
slotName = matchedModule.slotName
location = (
Expand Down
Loading