Skip to content

Commit 138895a

Browse files
committed
Edit namespace retrieval
1 parent 4daf390 commit 138895a

File tree

6 files changed

+5
-16
lines changed

6 files changed

+5
-16
lines changed

app/src/organisms/Desktop/ProtocolDetails/ProtocolLabwareDetails.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export const ProtocolLabwareDetails = (props: {
6161
{labwareAndLidDetails?.map((labware, index) => (
6262
<ProtocolLabwareDetailItem
6363
key={index}
64-
namespace={labware.namespace}
64+
namespace={labware.labwareDef.namespace}
6565
displayName={labware.labwareDef.metadata.displayName}
6666
quantity={labware.quantity}
6767
labware={{ definition: labware.labwareDef }}

app/src/pages/ODD/ProtocolDetails/Labware.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export const Labware = (props: { protocolId: string }): JSX.Element => {
9595
paddingLeft={SPACING.spacing24}
9696
alignItems={ALIGN_CENTER}
9797
>
98-
{labware.namespace === 'opentrons' ? (
98+
{labware.labwareDef.namespace === 'opentrons' ? (
9999
<Icon
100100
color={COLORS.blue50}
101101
name="check-decagram"

app/src/pages/ODD/ProtocolDetails/__tests__/Labware.test.tsx

-4
Original file line numberDiff line numberDiff line change
@@ -39,22 +39,18 @@ describe('Labware', () => {
3939
labwareDef: fixtureTiprack10ul as LabwareDefinition2,
4040
lidDisplayName: 'tiprack lid',
4141
quantity: 1,
42-
namespace: 'opentrons',
4342
},
4443
{
4544
labwareDef: fixtureTiprack300ul as LabwareDefinition2,
4645
quantity: 2,
47-
namespace: 'opentrons',
4846
},
4947
{
5048
labwareDef: fixture96Plate as LabwareDefinition2,
5149
quantity: 1,
52-
namespace: 'opentrons',
5350
},
5451
{
5552
labwareDef: fixtureTiprack10ul as LabwareDefinition2,
5653
quantity: 1,
57-
namespace: 'opentrons',
5854
},
5955
])
6056
})

app/src/pages/ODD/QuickTransferDetails/Labware.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export const Labware = (props: { transferId: string }): JSX.Element => {
8989
flexDirection={DIRECTION_ROW}
9090
paddingLeft={SPACING.spacing24}
9191
>
92-
{labware.namespace === 'opentrons' ? (
92+
{labware.labwareDef.namespace === 'opentrons' ? (
9393
<Icon
9494
color={COLORS.blue50}
9595
name="check-decagram"

app/src/pages/ODD/QuickTransferDetails/__tests__/Labware.test.tsx

+1-5
Original file line numberDiff line numberDiff line change
@@ -35,23 +35,19 @@ describe('Labware', () => {
3535
.thenReturn([
3636
{
3737
labwareDef: fixtureTiprack10ul as LabwareDefinition2,
38-
quantity: 1,
39-
namespace: 'opentrons',
38+
quantity: 2,
4039
},
4140
{
4241
labwareDef: fixtureTiprack300ul as LabwareDefinition2,
4342
quantity: 1,
44-
namespace: 'opentrons',
4543
},
4644
{
4745
labwareDef: fixture96Plate as LabwareDefinition2,
4846
quantity: 1,
49-
namespace: 'opentrons',
5047
},
5148
{
5249
labwareDef: fixtureTiprack10ul as LabwareDefinition2,
5350
quantity: 1,
54-
namespace: 'opentrons',
5551
},
5652
])
5753
})

app/src/transformations/commands/transformations/getRequiredLabwareDetailsFromLoadCommands.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@ import type {
88
} from '@opentrons/shared-data'
99

1010
export interface RequiredLabwareDetails {
11-
namespace: string
12-
quantity: number
1311
labwareDef: LabwareDefinition2
12+
quantity: number
1413
lidDisplayName?: string
1514
}
1615
type ProtocolDetailMap = Map<string, RequiredLabwareDetails>
@@ -47,7 +46,6 @@ export function getRequiredLabwareDetailsFromLoadCommands(
4746
const stackCount = command.result?.labwareIds.length
4847
if (!acc.has(defUri)) {
4948
acc.set(defUri, {
50-
namespace: command.params.namespace,
5149
labwareDef: command.result?.definition,
5250
quantity: 0,
5351
})
@@ -70,7 +68,6 @@ export function getRequiredLabwareDetailsFromLoadCommands(
7068

7169
if (!acc.has(defUri)) {
7270
acc.set(defUri, {
73-
namespace: command.params.namespace,
7471
labwareDef: command.result?.definition,
7572
quantity: 0,
7673
lidDisplayName:

0 commit comments

Comments
 (0)