@@ -22,20 +22,11 @@ import {
22
22
} from '@opentrons/components'
23
23
import { useModulesQuery } from '@opentrons/react-api-client'
24
24
import {
25
- FAKE_STAGING_AREA_RIGHT_SLOT ,
26
25
FLEX_ROBOT_TYPE ,
27
- FLEX_STACKER_FIXTURES ,
28
- getAAByAAId ,
29
- getAADisplayName ,
30
- getAASlotNameForAA ,
31
26
getCutoutDisplayName ,
32
27
getDeckDefFromRobotType ,
33
- getDeckDefWithFakes ,
34
28
getFixtureDisplayName ,
35
- replaceFixtureToFakeFixtureAndTransformCutoutFixturesToAA ,
36
- SINGLE_RIGHT_CUTOUTS ,
37
29
SINGLE_SLOT_FIXTURES ,
38
- STAGING_AREA_RIGHT_SLOT_FIXTURE ,
39
30
} from '@opentrons/shared-data'
40
31
41
32
import { useIsRobotViewable } from '/app/redux-resources/robots'
@@ -76,10 +67,6 @@ export function DeviceDetailsDeckConfiguration({
76
67
useNotifyDeckConfigurationQuery ( {
77
68
refetchInterval : DECK_CONFIG_REFETCH_INTERVAL ,
78
69
} ) . data ?? [ ]
79
-
80
- const deckConfigWithAA = replaceFixtureToFakeFixtureAndTransformCutoutFixturesToAA (
81
- deckConfig
82
- )
83
70
const deckDef = getDeckDefFromRobotType ( FLEX_ROBOT_TYPE )
84
71
const { isRunRunning } = useRunStatuses ( )
85
72
const { data : maintenanceRunData } = useNotifyCurrentMaintenanceRun ( {
@@ -96,17 +83,14 @@ export function DeviceDetailsDeckConfiguration({
96
83
} = useDeckConfigurationEditingTools ( false )
97
84
98
85
// do not show standard slot in fixture display list
99
- const { displayList : fixtureDisplayList } = deckConfigWithAA . reduce < {
86
+ const { displayList : fixtureDisplayList } = deckConfig . reduce < {
100
87
displayList : Array < { displayLocation : string ; displayName : string } >
101
88
groupedCutoutIds : CutoutId [ ]
102
89
} > (
103
- ( acc , { cutoutId, cutoutFixtureId, opentronsModuleSerialNumber, addressableAreaId } ) => {
104
- const areaInCheck = getAAByAAId ( addressableAreaId , deckDef )
105
- const shouldShow = areaInCheck . areaType != 'slot' && areaInCheck . areaType != 'stagingSlot'
90
+ ( acc , { cutoutId, cutoutFixtureId, opentronsModuleSerialNumber } ) => {
106
91
if (
107
92
cutoutFixtureId == null ||
108
93
SINGLE_SLOT_FIXTURES . includes ( cutoutFixtureId )
109
- || FAKE_STAGING_AREA_RIGHT_SLOT === cutoutFixtureId || ! shouldShow
110
94
) {
111
95
return acc
112
96
}
@@ -118,11 +102,9 @@ export function DeviceDetailsDeckConfiguration({
118
102
? `${ usbPort . port } .${ usbPort . hubPort } `
119
103
: usbPort ?. port
120
104
const displayName = getFixtureDisplayName ( cutoutFixtureId , portDisplay )
121
- console . log ( "displayName: " , displayName )
122
105
const fixtureGroup =
123
106
deckDef . cutoutFixtures . find ( cf => cf . id === cutoutFixtureId )
124
107
?. fixtureGroup ?? { }
125
- const name = getAASlotNameForAA ( cutoutId , cutoutFixtureId , addressableAreaId )
126
108
if ( cutoutId in fixtureGroup ) {
127
109
const groupMap =
128
110
fixtureGroup [ cutoutId ] ?. find ( group =>
@@ -135,14 +117,11 @@ export function DeviceDetailsDeckConfiguration({
135
117
) ?? { }
136
118
const groupedCutoutIds = Object . keys ( groupMap ) as CutoutId [ ]
137
119
const displayLocation = getDisplayLocationForCutoutIds ( groupedCutoutIds )
138
- console . log ( "displayLocation: " , displayLocation
139
- )
140
120
if ( acc . groupedCutoutIds . includes ( cutoutId ) ) {
141
121
return acc // only list grouped fixtures once
142
122
} else {
143
- console . log ( "in elsse" )
144
123
return {
145
- displayList : [ ...acc . displayList , { displayLocation : ( name ?? displayLocation ) , displayName } ] ,
124
+ displayList : [ ...acc . displayList , { displayLocation, displayName } ] ,
146
125
groupedCutoutIds : [ ...acc . groupedCutoutIds , ...groupedCutoutIds ] ,
147
126
}
148
127
}
@@ -152,7 +131,7 @@ export function DeviceDetailsDeckConfiguration({
152
131
displayList : [
153
132
...acc . displayList ,
154
133
{
155
- displayLocation : name ? name . replace ( 'fake' , '' ) : getDisplayLocationForCutoutIds ( [ cutoutId ] ) ,
134
+ displayLocation : getDisplayLocationForCutoutIds ( [ cutoutId ] ) ,
156
135
displayName,
157
136
} ,
158
137
] ,
0 commit comments