Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(app): Plate reader DQA #16946

Merged
merged 4 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/src/assets/localization/en/shared.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"change_robot": "Change robot",
"clear_data": "clear data",
"close": "close",
"closed": "closed",
"close_robot_door": "Close the robot door before starting the run.",
"confirm": "Confirm",
"confirm_placement": "Confirm placement",
Expand Down
2 changes: 1 addition & 1 deletion app/src/molecules/WizardRequiredEquipmentList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ function RequiredEquipmentCard(props: RequiredEquipmentCardProps): JSX.Element {
</Flex>
) : null}
<Flex
flex="0 1 70%"
flex={imageSrc == null ? '0 1 100%' : '0 1 70%'}
flexDirection={DIRECTION_COLUMN}
justifyContent={JUSTIFY_SPACE_AROUND}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,15 @@ export function HistoricalProtocolRun(
const { t } = useTranslation('run_details')
const { run, protocolName, robotIsBusy, robotName, protocolKey } = props
const [drawerOpen, setDrawerOpen] = useState(false)
const countRunDataFiles =
let countRunDataFiles =
'runTimeParameters' in run
? run?.runTimeParameters.filter(
parameter => parameter.type === 'csv_file'
).length
: 0
if ('outputFileIds' in run) {
countRunDataFiles += run.outputFileIds.length
}
const runStatus = run.status
const runDisplayName = formatTimestamp(run.createdAt)
let duration = EMPTY_TIMESTAMP
Expand Down
11 changes: 9 additions & 2 deletions app/src/organisms/LabwarePositionCheck/CheckItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,13 @@ export const CheckItem = (props: CheckItemProps): JSX.Element | null => {
t as TFunction,
i18n
)
const slotOnlyDisplayLocation = getDisplayLocation(
location,
labwareDefs,
t as TFunction,
i18n,
true
)
const labwareDisplayName = getLabwareDisplayName(labwareDef)

let placeItemInstruction: JSX.Element = (
Expand Down Expand Up @@ -445,7 +452,7 @@ export const CheckItem = (props: CheckItemProps): JSX.Element | null => {
<JogToWell
header={t('check_item_in_location', {
item: isTiprack ? t('tip_rack') : t('labware'),
location: displayLocation,
location: slotOnlyDisplayLocation,
})}
body={
<Trans
Expand Down Expand Up @@ -483,7 +490,7 @@ export const CheckItem = (props: CheckItemProps): JSX.Element | null => {
{...props}
header={t('prepare_item_in_location', {
item: isTiprack ? t('tip_rack') : t('labware'),
location: displayLocation,
location: slotOnlyDisplayLocation,
})}
body={
<UnorderedList
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,16 @@ export function getDisplayLocation(
location: LabwareOffsetLocation,
labwareDefinitions: LabwareDefinition2[],
t: TFunction,
i18n: i18n
i18n: i18n,
slotOnly?: boolean
): string {
const slotDisplayLocation = i18n.format(
t('slot_name', { slotName: location.slotName }),
'titleCase'
)
if (slotOnly) {
return slotDisplayLocation
}

if ('definitionUri' in location && location.definitionUri != null) {
const adapterDisplayName = labwareDefinitions.find(
Expand Down
8 changes: 6 additions & 2 deletions app/src/organisms/ModuleCard/AbsorbanceReaderData.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const AbsorbanceReaderData = (
props: AbsorbanceReaderProps
): JSX.Element | null => {
const { moduleData } = props
const { t } = useTranslation('device_details')
const { t, i18n } = useTranslation(['device_details', 'shared'])

const StatusLabelProps = {
status: 'Idle',
Expand All @@ -37,6 +37,10 @@ export const AbsorbanceReaderData = (
break
}
}
const lidDisplayStatus =
moduleData.lidStatus === 'on'
? i18n.format(t('shared:closed'), 'capitalize')
: i18n.format(t('shared:open'), 'capitalize')

return (
<>
Expand All @@ -46,7 +50,7 @@ export const AbsorbanceReaderData = (
data-testid="abs_module_data"
>
{t('abs_reader_lid_status', {
status: moduleData.lidStatus === 'on' ? 'closed' : 'open',
status: lidDisplayStatus,
})}
</StyledText>
</>
Expand Down
Loading