diff --git a/app/src/assets/localization/en/device_details.json b/app/src/assets/localization/en/device_details.json index d867aacb5bd..8a60bda0660 100644 --- a/app/src/assets/localization/en/device_details.json +++ b/app/src/assets/localization/en/device_details.json @@ -140,7 +140,6 @@ "set_temperature": "Set temperature", "shake_speed": "shake speed", "shaker": "Shaker", - "staging_area_slot": "Staging area slot", "status": "Status", "target_speed": "Target: {{speed}} rpm", "target_temp": "Target: {{temp}} °C", @@ -155,7 +154,6 @@ "this_robot_will_restart_with_update": "This robot has to restart to update its software. Restarting will immediately stop the current run or calibration.Do you want to update now anyway?", "tip_pickup_drop": "Tip Pickup / Drop", "to_run_protocol_go_to_protocols_page": "To run a protocol on this robot, import a protocol on the Protocols page", - "trash": "Trash", "update_now": "Update now", "updating_firmware": "Updating firmware...", "usb_port_not_connected": "usb not connected", @@ -164,7 +162,6 @@ "view_pipette_setting": "Pipette Settings", "view_run_record": "View protocol run record", "view": "View", - "waste_chute": "Waste chute", "welcome_modal_description": "A place to run protocols, manage your instruments, and view robot status.", "welcome_to_your_dashboard": "Welcome to your dashboard!", "yes_update_now": "Yes, update now" diff --git a/app/src/organisms/DeviceDetailsDeckConfiguration/index.tsx b/app/src/organisms/DeviceDetailsDeckConfiguration/index.tsx index b40a12232e8..cf1f29e4118 100644 --- a/app/src/organisms/DeviceDetailsDeckConfiguration/index.tsx +++ b/app/src/organisms/DeviceDetailsDeckConfiguration/index.tsx @@ -8,25 +8,23 @@ import { BORDERS, COLORS, DIRECTION_COLUMN, + SIZE_5, SPACING, TYPOGRAPHY, - SIZE_5, } from '@opentrons/components' import { useDeckConfigurationQuery, useUpdateDeckConfigurationMutation, } from '@opentrons/react-api-client' import { + getFixtureDisplayName, STAGING_AREA_LOAD_NAME, STANDARD_SLOT_LOAD_NAME, TRASH_BIN_LOAD_NAME, - WASTE_CHUTE_LOAD_NAME, } from '@opentrons/shared-data' import { StyledText } from '../../atoms/text' -import type { FixtureLoadName } from '@opentrons/shared-data' - interface DeviceDetailsDeckConfigurationProps { robotName: string } @@ -67,14 +65,10 @@ export function DeviceDetailsDeckConfiguration({ }) } - // TODO: replace with getFixtureDisplayName - const fixtureDisplayNameDictionary: Record = { - [STAGING_AREA_LOAD_NAME]: t('staging_area_slot'), - // do not display standard slot - [STANDARD_SLOT_LOAD_NAME]: null, - [TRASH_BIN_LOAD_NAME]: t('trash'), - [WASTE_CHUTE_LOAD_NAME]: t('waste_chute'), - } + // do not show standard slot in fixture display list + const fixtureDisplayList = deckConfig.filter( + fixture => fixture.loadName !== STANDARD_SLOT_LOAD_NAME + ) return ( {t('location')} {t('fixture')} - {deckConfig.map(fixture => { - const fixtureDisplayName = - fixtureDisplayNameDictionary[fixture.loadName] - return fixtureDisplayName != null ? ( + {fixtureDisplayList.map(fixture => { + return ( {fixture.fixtureLocation} - {fixtureDisplayName} + + {getFixtureDisplayName(fixture.loadName)} + - ) : null + ) })} diff --git a/shared-data/js/fixtures.ts b/shared-data/js/fixtures.ts index 560a6141df0..d424464e43d 100644 --- a/shared-data/js/fixtures.ts +++ b/shared-data/js/fixtures.ts @@ -1,9 +1,15 @@ -import { STAGING_AREA_LOAD_NAME, WASTE_CHUTE_LOAD_NAME } from './constants' +import { + STAGING_AREA_LOAD_NAME, + TRASH_BIN_LOAD_NAME, + WASTE_CHUTE_LOAD_NAME, +} from './constants' import type { FixtureLoadName } from './types' export function getFixtureDisplayName(loadName: FixtureLoadName): string { if (loadName === STAGING_AREA_LOAD_NAME) { return 'Staging Area Slot' + } else if (loadName === TRASH_BIN_LOAD_NAME) { + return 'Trash Bin' } else if (loadName === WASTE_CHUTE_LOAD_NAME) { return 'Waste Chute' } else {