Skip to content

Commit 6ae2f38

Browse files
authored
fix(app): Plate reader DQA (#16946)
fix RQA-3570, RQA-3572, RQA-3573, RQA-3633, RQA-3634
1 parent 7e6c8ee commit 6ae2f38

File tree

6 files changed

+26
-7
lines changed

6 files changed

+26
-7
lines changed

app/src/assets/localization/en/shared.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"change_robot": "Change robot",
1212
"clear_data": "clear data",
1313
"close": "close",
14+
"closed": "closed",
1415
"close_robot_door": "Close the robot door before starting the run.",
1516
"confirm": "Confirm",
1617
"confirm_placement": "Confirm placement",

app/src/molecules/WizardRequiredEquipmentList/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ function RequiredEquipmentCard(props: RequiredEquipmentCardProps): JSX.Element {
155155
</Flex>
156156
) : null}
157157
<Flex
158-
flex="0 1 70%"
158+
flex={imageSrc == null ? '0 1 100%' : '0 1 70%'}
159159
flexDirection={DIRECTION_COLUMN}
160160
justifyContent={JUSTIFY_SPACE_AROUND}
161161
>

app/src/organisms/Desktop/Devices/HistoricalProtocolRun.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,15 @@ export function HistoricalProtocolRun(
4141
const { t } = useTranslation('run_details')
4242
const { run, protocolName, robotIsBusy, robotName, protocolKey } = props
4343
const [drawerOpen, setDrawerOpen] = useState(false)
44-
const countRunDataFiles =
44+
let countRunDataFiles =
4545
'runTimeParameters' in run
4646
? run?.runTimeParameters.filter(
4747
parameter => parameter.type === 'csv_file'
4848
).length
4949
: 0
50+
if ('outputFileIds' in run) {
51+
countRunDataFiles += run.outputFileIds.length
52+
}
5053
const runStatus = run.status
5154
const runDisplayName = formatTimestamp(run.createdAt)
5255
let duration = EMPTY_TIMESTAMP

app/src/organisms/LabwarePositionCheck/CheckItem.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,13 @@ export const CheckItem = (props: CheckItemProps): JSX.Element | null => {
156156
t as TFunction,
157157
i18n
158158
)
159+
const slotOnlyDisplayLocation = getDisplayLocation(
160+
location,
161+
labwareDefs,
162+
t as TFunction,
163+
i18n,
164+
true
165+
)
159166
const labwareDisplayName = getLabwareDisplayName(labwareDef)
160167

161168
let placeItemInstruction: JSX.Element = (
@@ -445,7 +452,7 @@ export const CheckItem = (props: CheckItemProps): JSX.Element | null => {
445452
<JogToWell
446453
header={t('check_item_in_location', {
447454
item: isTiprack ? t('tip_rack') : t('labware'),
448-
location: displayLocation,
455+
location: slotOnlyDisplayLocation,
449456
})}
450457
body={
451458
<Trans
@@ -483,7 +490,7 @@ export const CheckItem = (props: CheckItemProps): JSX.Element | null => {
483490
{...props}
484491
header={t('prepare_item_in_location', {
485492
item: isTiprack ? t('tip_rack') : t('labware'),
486-
location: displayLocation,
493+
location: slotOnlyDisplayLocation,
487494
})}
488495
body={
489496
<UnorderedList

app/src/organisms/LabwarePositionCheck/utils/getDisplayLocation.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,16 @@ export function getDisplayLocation(
1212
location: LabwareOffsetLocation,
1313
labwareDefinitions: LabwareDefinition2[],
1414
t: TFunction,
15-
i18n: i18n
15+
i18n: i18n,
16+
slotOnly?: boolean
1617
): string {
1718
const slotDisplayLocation = i18n.format(
1819
t('slot_name', { slotName: location.slotName }),
1920
'titleCase'
2021
)
22+
if (slotOnly) {
23+
return slotDisplayLocation
24+
}
2125

2226
if ('definitionUri' in location && location.definitionUri != null) {
2327
const adapterDisplayName = labwareDefinitions.find(

app/src/organisms/ModuleCard/AbsorbanceReaderData.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export const AbsorbanceReaderData = (
1212
props: AbsorbanceReaderProps
1313
): JSX.Element | null => {
1414
const { moduleData } = props
15-
const { t } = useTranslation('device_details')
15+
const { t, i18n } = useTranslation(['device_details', 'shared'])
1616

1717
const StatusLabelProps = {
1818
status: 'Idle',
@@ -37,6 +37,10 @@ export const AbsorbanceReaderData = (
3737
break
3838
}
3939
}
40+
const lidDisplayStatus =
41+
moduleData.lidStatus === 'on'
42+
? i18n.format(t('shared:closed'), 'capitalize')
43+
: i18n.format(t('shared:open'), 'capitalize')
4044

4145
return (
4246
<>
@@ -46,7 +50,7 @@ export const AbsorbanceReaderData = (
4650
data-testid="abs_module_data"
4751
>
4852
{t('abs_reader_lid_status', {
49-
status: moduleData.lidStatus === 'on' ? 'closed' : 'open',
53+
status: lidDisplayStatus,
5054
})}
5155
</StyledText>
5256
</>

0 commit comments

Comments
 (0)