Skip to content

Commit d5c7f2a

Browse files
authored
fix(protocol-designer): allow to delete and re-add thermocycler (#18503)
closes RQA-4230
1 parent 34a0054 commit d5c7f2a

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

protocol-designer/src/components/organisms/HardwareConfigurator/index.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,16 @@ export function HardwareConfigurator(
5757
const hasModule = Object.values(modules).some(
5858
module => module.cutoutId === cutoutId
5959
)
60+
// since we are adding cutoutA1 in moduleConfig if
61+
// there is a TC
62+
const hasTCAndCutoutA1 =
63+
Object.values(modules).some(
64+
module => module.type === THERMOCYCLER_MODULE_TYPE
65+
) && cutoutId === 'cutoutA1'
6066
const hasFixture = Object.values(fixtures).some(
6167
fixture => fixture.cutoutId === cutoutId
6268
)
63-
return !hasModule && !hasFixture
69+
return !hasModule && !hasFixture && !hasTCAndCutoutA1
6470
}
6571
)
6672
const moduleConfig: DeckConfiguration = Object.values(modules).flatMap(

protocol-designer/src/components/organisms/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ export const getLabwareCompatibleForEditHardware = (
111111
} else if (labwareDefB1 != null) {
112112
labwareCompatible = getLabwareIsCompatible(labwareDefB1, moduleType)
113113
} else {
114-
labwareCompatible = false
114+
labwareCompatible = true
115115
}
116116
} else if (labwareDef != null && moduleType != null) {
117117
labwareCompatible = getLabwareIsCompatible(labwareDef, moduleType)

0 commit comments

Comments
 (0)